<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>ShipCAD: ShipCADlib/viewport.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ShipCAD
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_f0b6ef187c5b1483641b038f81654ac4.html">ShipCADlib</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">viewport.cpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="viewport_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*##############################################################################################</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> *    ShipCAD                                                                                  *</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *    Copyright 2015, by Greg Green &lt;ggreen@bit-builder.com&gt;                                   *</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> *    Original Copyright header below                                                          *</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> *                                                                                             *</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> *    This code is distributed as part of the FREE!ship project. FREE!ship is an               *</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> *    open source surface-modelling program based on subdivision surfaces and intended for     *</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> *    designing ships.                                                                         *</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> *                                                                                             *</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> *    Copyright © 2005, by Martijn van Engeland                                                *</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> *    e-mail                  : Info@FREEship.org                                              *</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> *    FREE!ship project page  : https://sourceforge.net/projects/freeship                      *</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> *    FREE!ship homepage      : www.FREEship.org                                               *</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> *                                                                                             *</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> *    This program is free software; you can redistribute it and/or modify it under            *</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> *    the terms of the GNU General Public License as published by the                          *</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> *    Free Software Foundation; either version 2 of the License, or (at your option)           *</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> *    any later version.                                                                       *</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> *                                                                                             *</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> *    This program is distributed in the hope that it will be useful, but WITHOUT ANY          *</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment"> *    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A          *</span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment"> *    PARTICULAR PURPOSE. See the GNU General Public License for more details.                 *</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment"> *                                                                                             *</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="comment"> *    You should have received a copy of the GNU General Public License along with             *</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="comment"> *    this program; if not, write to the Free Software Foundation, Inc.,                       *</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="comment"> *    59 Temple Place, Suite 330, Boston, MA 02111-1307 USA                                    *</span></div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="comment"> *                                                                                             *</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="comment"> *#############################################################################################*/</span></div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="preprocessor">#include &lt;iostream&gt;</span></div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="preprocessor">#include &lt;QApplication&gt;</span></div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="viewport_8h.html">viewport.h</a>&quot;</span></div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="viewportview_8h.html">viewportview.h</a>&quot;</span></div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="shader_8h.html">shader.h</a>&quot;</span></div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="controller_8h.html">controller.h</a>&quot;</span></div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="entity_8h.html">entity.h</a>&quot;</span></div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="subdivsurface_8h.html">subdivsurface.h</a>&quot;</span></div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="utility_8h.html">utility.h</a>&quot;</span></div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="keyword">using namespace </span><a class="code" href="namespacestd.html">std</a>;</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="keyword">using namespace </span><a class="code" href="namespaceShipCAD.html">ShipCAD</a>;</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;</div><div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="classShipCAD_1_1ViewportContextEvent.html#a650e08d01b91eecaae90b3cd107ae46b">   46</a></span>&#160;ViewportContextEvent::ViewportContextEvent(<a class="code" href="classShipCAD_1_1Viewport.html">Viewport</a>* vp, QMouseEvent* event)</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    : _vp(vp), _event(event)</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;{</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    <span class="comment">// does nothing</span></div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;}</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;</div><div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="classShipCAD_1_1Viewport.html#af6af98eae1040b82b047df5a679e891b">   54</a></span>&#160;<a class="code" href="classShipCAD_1_1Viewport.html#af6af98eae1040b82b047df5a679e891b">Viewport::Viewport</a>(<a class="code" href="classShipCAD_1_1Controller.html">Controller</a>* ctl, <a class="code" href="namespaceShipCAD.html#aeeeb05810f2e31ef89fd4ac6b6ba9c0a">viewport_type_t</a> vtype)</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    : _ctl(ctl), _mode(<a class="code" href="namespaceShipCAD.html#a67437198ee14f74e6c5277d761894863a109cd328af19be260371a7e5333043f8">vmWireFrame</a>), _view_type(vtype),</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;      _view(0), _drag_state(0), _current_shader(0)</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;{</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;    _view = <a class="code" href="classShipCAD_1_1ViewportView.html#aec2ef49c2d2ecf9099dfbf32cd645144">ViewportView::construct</a>(vtype, <span class="keyword">this</span>);</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;}</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;</div><div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="classShipCAD_1_1Viewport.html#a1e18a1ff4a52be33ef63d25034561850">   61</a></span>&#160;<a class="code" href="classShipCAD_1_1Viewport.html#a1e18a1ff4a52be33ef63d25034561850">Viewport::~Viewport</a>()</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;{</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;    <span class="keyword">delete</span> _view;</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;    </div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    map&lt;string, Shader*&gt;::iterator i = _shaders.begin();</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    <span class="keywordflow">while</span> (i != _shaders.end()) {</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;        <span class="keyword">delete</span> (*i).second;</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;        ++i;</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;    }</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;}</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;</div><div class="line"><a name="l00072"></a><span class="lineno"><a class="line" href="classShipCAD_1_1Viewport.html#ae8cc8dfbda37517c2af3821cd87deb74">   72</a></span>&#160;<a class="code" href="classShipCAD_1_1Controller.html">Controller</a>* <a class="code" href="classShipCAD_1_1Viewport.html#ae8cc8dfbda37517c2af3821cd87deb74">Viewport::getController</a>()</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;{</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;    <span class="keywordflow">return</span> _ctl;</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;}</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;</div><div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="classShipCAD_1_1Viewport.html#abb20c88690f8513f48f3faa010998a5f">   77</a></span>&#160;<span class="keyword">const</span> <a class="code" href="classShipCAD_1_1Controller.html">Controller</a>* <a class="code" href="classShipCAD_1_1Viewport.html#ae8cc8dfbda37517c2af3821cd87deb74">Viewport::getController</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;<span class="keyword"></span>{</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    <span class="keywordflow">return</span> _ctl;</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;}</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;</div><div class="line"><a name="l00082"></a><span class="lineno"><a class="line" href="classShipCAD_1_1Viewport.html#acce571248835d8a66fcb4787c2384824">   82</a></span>&#160;<span class="keyword">const</span> QVector3D&amp; <a class="code" href="classShipCAD_1_1Viewport.html#acce571248835d8a66fcb4787c2384824">Viewport::getCamera</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;<span class="keyword"></span>{</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;    <span class="keywordflow">return</span> _view-&gt;<a class="code" href="classShipCAD_1_1ViewportView.html#a33150e3f757ddbbe045d7d046b4862e5">getCamera</a>();</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;}</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;</div><div class="line"><a name="l00087"></a><span class="lineno"><a class="line" href="classShipCAD_1_1Viewport.html#a9c35de3f7c9d7c860c494081b48309b3">   87</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classShipCAD_1_1Viewport.html#a9c35de3f7c9d7c860c494081b48309b3">Viewport::initialize</a>()</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;{</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;    <a class="code" href="classOpenGLWindow.html#aed4e2ee22e113b2f7e7d1eba4ef1b965">OpenGLWindow::initialize</a>();</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    <a class="code" href="classShipCAD_1_1LineShader.html">LineShader</a>* lineshader = <span class="keyword">new</span> <a class="code" href="classShipCAD_1_1LineShader.html">LineShader</a>(<span class="keyword">this</span>);</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;    <a class="code" href="classShipCAD_1_1Viewport.html#a886ac5965b63039799827da89bf3de20">addShader</a>(<span class="stringliteral">&quot;lineshader&quot;</span>, lineshader);</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    <a class="code" href="classShipCAD_1_1MonoFaceShader.html">MonoFaceShader</a>* monofaceshader = <span class="keyword">new</span> <a class="code" href="classShipCAD_1_1MonoFaceShader.html">MonoFaceShader</a>(<span class="keyword">this</span>);</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    <a class="code" href="classShipCAD_1_1Viewport.html#a886ac5965b63039799827da89bf3de20">addShader</a>(<span class="stringliteral">&quot;monofaceshader&quot;</span>, monofaceshader);</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    <a class="code" href="classShipCAD_1_1LightedFaceShader.html">LightedFaceShader</a>* lightedfaceshader = <span class="keyword">new</span> <a class="code" href="classShipCAD_1_1LightedFaceShader.html">LightedFaceShader</a>(<span class="keyword">this</span>);</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    <a class="code" href="classShipCAD_1_1Viewport.html#a886ac5965b63039799827da89bf3de20">addShader</a>(<span class="stringliteral">&quot;lightedfaceshader&quot;</span>, lightedfaceshader);</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    <a class="code" href="classShipCAD_1_1CurveFaceShader.html">CurveFaceShader</a>* curvefaceshader = <span class="keyword">new</span> <a class="code" href="classShipCAD_1_1CurveFaceShader.html">CurveFaceShader</a>(<span class="keyword">this</span>);</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    <a class="code" href="classShipCAD_1_1Viewport.html#a886ac5965b63039799827da89bf3de20">addShader</a>(<span class="stringliteral">&quot;curvefaceshader&quot;</span>, curvefaceshader);</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;}</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;</div><div class="line"><a name="l00104"></a><span class="lineno"><a class="line" href="classShipCAD_1_1Viewport.html#a578ac5ee96e36638739517fa21bf70c0">  104</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classShipCAD_1_1Viewport.html#a578ac5ee96e36638739517fa21bf70c0">Viewport::setViewportMode</a>(<a class="code" href="namespaceShipCAD.html#a67437198ee14f74e6c5277d761894863">viewport_mode_t</a> mode)</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;{</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;    <span class="keywordflow">if</span> (mode != _mode) {</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;        _mode = mode;</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;        <a class="code" href="classOpenGLWindow.html#abea9e50147496e5110b86f03122fbece">renderLater</a>();</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;    }</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;}</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;</div><div class="line"><a name="l00112"></a><span class="lineno"><a class="line" href="classShipCAD_1_1Viewport.html#a017abe5691674d1d232ad8c012b30339">  112</a></span>&#160;<a class="code" href="namespaceShipCAD.html#a58f51ebd2e66de5e41c2ffd6f434241e">camera_type_t</a> <a class="code" href="classShipCAD_1_1Viewport.html#a017abe5691674d1d232ad8c012b30339">Viewport::getCameraType</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;<span class="keyword"></span>{</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;    <span class="keywordflow">if</span> (_view_type != <a class="code" href="namespaceShipCAD.html#aeeeb05810f2e31ef89fd4ac6b6ba9c0aaccdacbf26c0ffe78ae55326537a28dc1">fvPerspective</a>)</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="namespaceShipCAD.html#a58f51ebd2e66de5e41c2ffd6f434241eaa4100f3d3073015697dd72390b55fa44">ftStandard</a>;</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;    <a class="code" href="classShipCAD_1_1ViewportViewPerspective.html">ViewportViewPerspective</a>* view = <span class="keyword">dynamic_cast&lt;</span><a class="code" href="classShipCAD_1_1ViewportViewPerspective.html">ViewportViewPerspective</a>*<span class="keyword">&gt;</span>(_view);</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;    <span class="keywordflow">return</span> view-&gt;<a class="code" href="classShipCAD_1_1ViewportViewPerspective.html#a76e1128fb2031c44b4d04eecbeace739">getCameraType</a>();</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;}</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;</div><div class="line"><a name="l00120"></a><span class="lineno"><a class="line" href="classShipCAD_1_1Viewport.html#a5f90a885e0204b32ff9795c4b79f824b">  120</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classShipCAD_1_1Viewport.html#a5f90a885e0204b32ff9795c4b79f824b">Viewport::setCameraType</a>(<a class="code" href="namespaceShipCAD.html#a58f51ebd2e66de5e41c2ffd6f434241e">camera_type_t</a> val)</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;{</div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;    <span class="keywordflow">if</span> (_view_type != <a class="code" href="namespaceShipCAD.html#aeeeb05810f2e31ef89fd4ac6b6ba9c0aaccdacbf26c0ffe78ae55326537a28dc1">fvPerspective</a>)</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;        <span class="keywordflow">return</span>;</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;    <a class="code" href="classShipCAD_1_1ViewportViewPerspective.html">ViewportViewPerspective</a>* view = <span class="keyword">dynamic_cast&lt;</span><a class="code" href="classShipCAD_1_1ViewportViewPerspective.html">ViewportViewPerspective</a>*<span class="keyword">&gt;</span>(_view);</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;    view-&gt;<a class="code" href="classShipCAD_1_1ViewportViewPerspective.html#ab1a56bd7cb986e2c3163bcacd201d32d">setCameraType</a>(val);</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;    <a class="code" href="classShipCAD_1_1Viewport.html#a7997e0e684a4f8b5709f4d98be6cebb4">update</a>();</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;}</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;</div><div class="line"><a name="l00129"></a><span class="lineno"><a class="line" href="classShipCAD_1_1Viewport.html#a554a3455c39ee5652b13c9b24c3c962e">  129</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classShipCAD_1_1Viewport.html#a554a3455c39ee5652b13c9b24c3c962e">Viewport::setViewportType</a>(<a class="code" href="namespaceShipCAD.html#aeeeb05810f2e31ef89fd4ac6b6ba9c0a">viewport_type_t</a> ty)</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;{</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;    <span class="keywordflow">if</span> (ty != _view_type) {</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;        <span class="keyword">delete</span> _view;</div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;        _view = <a class="code" href="classShipCAD_1_1ViewportView.html#aec2ef49c2d2ecf9099dfbf32cd645144">ViewportView::construct</a>(ty, <span class="keyword">this</span>);</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;        _view_type = ty;</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;        <a class="code" href="classShipCAD_1_1Viewport.html#a7997e0e684a4f8b5709f4d98be6cebb4">update</a>();</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;    }</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;}</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;</div><div class="line"><a name="l00139"></a><span class="lineno"><a class="line" href="classShipCAD_1_1Viewport.html#a9f643e335e21dc9b752098e00dc5db48">  139</a></span>&#160;<span class="keywordtype">float</span> <a class="code" href="classShipCAD_1_1Viewport.html#a9f643e335e21dc9b752098e00dc5db48">Viewport::getAngle</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;<span class="keyword"></span>{</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;    <span class="keywordflow">if</span> (_view_type != <a class="code" href="namespaceShipCAD.html#aeeeb05810f2e31ef89fd4ac6b6ba9c0aaccdacbf26c0ffe78ae55326537a28dc1">fvPerspective</a>)</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;        <span class="keywordflow">return</span> 0.0;</div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;    <a class="code" href="classShipCAD_1_1ViewportViewPerspective.html">ViewportViewPerspective</a>* view = <span class="keyword">dynamic_cast&lt;</span><a class="code" href="classShipCAD_1_1ViewportViewPerspective.html">ViewportViewPerspective</a>*<span class="keyword">&gt;</span>(_view);</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;    <span class="keywordflow">return</span> view-&gt;<a class="code" href="classShipCAD_1_1ViewportViewPerspective.html#a6d48a61a324740874979d599352bef82">getAngle</a>();</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;}</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;</div><div class="line"><a name="l00147"></a><span class="lineno"><a class="line" href="classShipCAD_1_1Viewport.html#a00ba2139fa06701b65de70d5c657f5d6">  147</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classShipCAD_1_1Viewport.html#a00ba2139fa06701b65de70d5c657f5d6">Viewport::setAngle</a>(<span class="keywordtype">float</span> val)</div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;{</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;    <span class="keywordflow">if</span> (_view_type != <a class="code" href="namespaceShipCAD.html#aeeeb05810f2e31ef89fd4ac6b6ba9c0aaccdacbf26c0ffe78ae55326537a28dc1">fvPerspective</a>)</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;        <span class="keywordflow">return</span>;</div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;    <a class="code" href="classShipCAD_1_1ViewportViewPerspective.html">ViewportViewPerspective</a>* view = <span class="keyword">dynamic_cast&lt;</span><a class="code" href="classShipCAD_1_1ViewportViewPerspective.html">ViewportViewPerspective</a>*<span class="keyword">&gt;</span>(_view);</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;    view-&gt;<a class="code" href="classShipCAD_1_1ViewportViewPerspective.html#ad6d853a15bc9015d43e4c052471f2cb1">setAngle</a>(val);</div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;    <a class="code" href="classShipCAD_1_1Viewport.html#a7997e0e684a4f8b5709f4d98be6cebb4">update</a>();</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;}</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;</div><div class="line"><a name="l00156"></a><span class="lineno"><a class="line" href="classShipCAD_1_1Viewport.html#a719ba3bde9e3b390215c420bd62e6b20">  156</a></span>&#160;<span class="keywordtype">float</span> <a class="code" href="classShipCAD_1_1Viewport.html#a719ba3bde9e3b390215c420bd62e6b20">Viewport::getElevation</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;<span class="keyword"></span>{</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;    <span class="keywordflow">if</span> (_view_type != <a class="code" href="namespaceShipCAD.html#aeeeb05810f2e31ef89fd4ac6b6ba9c0aaccdacbf26c0ffe78ae55326537a28dc1">fvPerspective</a>)</div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;        <span class="keywordflow">return</span> 0.0;</div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;    <a class="code" href="classShipCAD_1_1ViewportViewPerspective.html">ViewportViewPerspective</a>* view = <span class="keyword">dynamic_cast&lt;</span><a class="code" href="classShipCAD_1_1ViewportViewPerspective.html">ViewportViewPerspective</a>*<span class="keyword">&gt;</span>(_view);</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;    <span class="keywordflow">return</span> view-&gt;<a class="code" href="classShipCAD_1_1ViewportViewPerspective.html#a4baad3b4ab5a1f3fb7fd2dfa9ac49952">getElevation</a>();</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;}</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;</div><div class="line"><a name="l00164"></a><span class="lineno"><a class="line" href="classShipCAD_1_1Viewport.html#a4bda4b742dc477ed5dc2ab6ac7fe92bc">  164</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classShipCAD_1_1Viewport.html#a4bda4b742dc477ed5dc2ab6ac7fe92bc">Viewport::setElevation</a>(<span class="keywordtype">float</span> val)</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;{</div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;    <span class="keywordflow">if</span> (_view_type != <a class="code" href="namespaceShipCAD.html#aeeeb05810f2e31ef89fd4ac6b6ba9c0aaccdacbf26c0ffe78ae55326537a28dc1">fvPerspective</a>)</div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;        <span class="keywordflow">return</span>;</div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;    <a class="code" href="classShipCAD_1_1ViewportViewPerspective.html">ViewportViewPerspective</a>* view = <span class="keyword">dynamic_cast&lt;</span><a class="code" href="classShipCAD_1_1ViewportViewPerspective.html">ViewportViewPerspective</a>*<span class="keyword">&gt;</span>(_view);</div><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;    view-&gt;<a class="code" href="classShipCAD_1_1ViewportViewPerspective.html#ad09e4532f81905f9ea90545b0b6d4856">setElevation</a>(val);</div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;    <a class="code" href="classShipCAD_1_1Viewport.html#a7997e0e684a4f8b5709f4d98be6cebb4">update</a>();</div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;}</div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;</div><div class="line"><a name="l00173"></a><span class="lineno"><a class="line" href="classShipCAD_1_1Viewport.html#aab16013a5098f23f3f1bb9d4318c3d3b">  173</a></span>&#160;QPoint <a class="code" href="classShipCAD_1_1Viewport.html#aab16013a5098f23f3f1bb9d4318c3d3b">Viewport::convert3D</a>(<span class="keyword">const</span> QVector3D&amp; pt)<span class="keyword"> const</span></div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;<span class="keyword"></span>{</div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;    <span class="keywordflow">return</span> _view-&gt;<a class="code" href="classShipCAD_1_1ViewportView.html#ac763be6de52b393cb0b9ff4be4c66fcf">convert3D</a>(pt, width(), height());</div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;}</div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;</div><div class="line"><a name="l00178"></a><span class="lineno"><a class="line" href="classShipCAD_1_1Viewport.html#a4eeeb100fd88487215bb7794bdf5e0cb">  178</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classShipCAD_1_1Viewport.html#a4eeeb100fd88487215bb7794bdf5e0cb">Viewport::resizeEvent</a>(QResizeEvent *<a class="code" href="classOpenGLWindow.html#a1e3045cffb900de55b7384f5091c9d94">event</a>)</div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;{</div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;    cout &lt;&lt; <span class="stringliteral">&quot;vp resize event: &quot;</span> &lt;&lt; <span class="keyword">event</span>-&gt;size().width()</div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;         &lt;&lt; <span class="stringliteral">&quot;,&quot;</span> &lt;&lt; <span class="keyword">event</span>-&gt;size().height() &lt;&lt; endl;</div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;    <a class="code" href="classShipCAD_1_1Viewport.html#a7997e0e684a4f8b5709f4d98be6cebb4">update</a>();</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;}</div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;</div><div class="line"><a name="l00185"></a><span class="lineno"><a class="line" href="classShipCAD_1_1Viewport.html#a7997e0e684a4f8b5709f4d98be6cebb4">  185</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classShipCAD_1_1Viewport.html#a7997e0e684a4f8b5709f4d98be6cebb4">Viewport::update</a>()</div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;{</div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;    QVector3D min, max;</div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;    <a class="code" href="classShipCAD_1_1Viewport.html#ae8cc8dfbda37517c2af3821cd87deb74">getController</a>()-&gt;<a class="code" href="classShipCAD_1_1Controller.html#a7868a3bac4ed86abff1fe5a0fabb4abd">getModel</a>()-&gt;<a class="code" href="classShipCAD_1_1ShipCADModel.html#a6941ad7a2b167419e844823fa8461019">getSurface</a>()-&gt;<a class="code" href="classShipCAD_1_1SubdivisionSurface.html#abc1cf0168290242dfbe5dd0d178fa7cb">extents</a>(min, max);</div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;    _view-&gt;<a class="code" href="classShipCAD_1_1ViewportView.html#ad1c89a6e34b7b3795a7f21e67181dc0f">initializeViewport</a>(min, max, width(), height());</div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;    <a class="code" href="classOpenGLWindow.html#abea9e50147496e5110b86f03122fbece">renderLater</a>();</div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;}</div><div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;</div><div class="line"><a name="l00193"></a><span class="lineno"><a class="line" href="classShipCAD_1_1Viewport.html#a886ac5965b63039799827da89bf3de20">  193</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classShipCAD_1_1Viewport.html#a886ac5965b63039799827da89bf3de20">Viewport::addShader</a>(<span class="keyword">const</span> <span class="keywordtype">string</span> &amp;name, <a class="code" href="classShipCAD_1_1Shader.html">Shader</a> *shader)</div><div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;{</div><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;    _shaders[name] = shader;</div><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;}</div><div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;</div><div class="line"><a name="l00198"></a><span class="lineno"><a class="line" href="classShipCAD_1_1Viewport.html#ac0c02d6e3a0933669de2292f041c69e6">  198</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classShipCAD_1_1Viewport.html#ac0c02d6e3a0933669de2292f041c69e6">Viewport::clearBackground</a>()</div><div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;{</div><div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;    glViewport(0, 0, width(), height());</div><div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;    </div><div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;    <span class="comment">// set the color of the background</span></div><div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;    QColor vpcolor = <a class="code" href="classShipCAD_1_1Viewport.html#ae8cc8dfbda37517c2af3821cd87deb74">getController</a>()-&gt;<a class="code" href="classShipCAD_1_1Controller.html#a7868a3bac4ed86abff1fe5a0fabb4abd">getModel</a>()-&gt;<a class="code" href="classShipCAD_1_1ShipCADModel.html#aa6af8872deba5b401ac575a85901a265">getPreferences</a>().<a class="code" href="classShipCAD_1_1Preferences.html#ab511ccb47da78b8fb580c16aa027b4fa">getViewportColor</a>();</div><div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;    glClearColor(vpcolor.redF(), vpcolor.greenF(), vpcolor.blueF(), 1.0);</div><div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);</div><div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;}</div><div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;</div><div class="line"><a name="l00208"></a><span class="lineno"><a class="line" href="classShipCAD_1_1Viewport.html#ad48bfa81c7034792f290ed47bac203c5">  208</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classShipCAD_1_1Viewport.html#ad48bfa81c7034792f290ed47bac203c5">Viewport::renderWithPainter</a>(QPainter* painter)</div><div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;{</div><div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;    cout &lt;&lt; <span class="stringliteral">&quot;Viewport::renderWithPainter&quot;</span> &lt;&lt; endl;</div><div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;</div><div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;    <span class="comment">// draw the model</span></div><div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;    <a class="code" href="classShipCAD_1_1Viewport.html#ae8cc8dfbda37517c2af3821cd87deb74">getController</a>()-&gt;<a class="code" href="classShipCAD_1_1Controller.html#a7868a3bac4ed86abff1fe5a0fabb4abd">getModel</a>()-&gt;<a class="code" href="classShipCAD_1_1ShipCADModel.html#aa7d2417dcc847ccf0f72d57eb333410e">drawWithPainter</a>(*<span class="keyword">this</span>, painter);</div><div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;}</div><div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;</div><div class="line"><a name="l00216"></a><span class="lineno"><a class="line" href="classShipCAD_1_1Viewport.html#ae1a93920fcaf1b6eaa46d390bbd15ce4">  216</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classShipCAD_1_1Viewport.html#ae1a93920fcaf1b6eaa46d390bbd15ce4">Viewport::renderOpenGL</a>()</div><div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;{</div><div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;    cout &lt;&lt; <span class="stringliteral">&quot;Viewport::renderOpenGL&quot;</span> &lt;&lt; endl;</div><div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;</div><div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;    glEnable(GL_DEPTH_TEST);</div><div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;    </div><div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;    <span class="comment">// draw the model</span></div><div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;    <a class="code" href="classShipCAD_1_1Viewport.html#ae8cc8dfbda37517c2af3821cd87deb74">getController</a>()-&gt;<a class="code" href="classShipCAD_1_1Controller.html#a7868a3bac4ed86abff1fe5a0fabb4abd">getModel</a>()-&gt;<a class="code" href="classShipCAD_1_1ShipCADModel.html#abf593b803e96a1fd8e56f36b3b6d0954">draw</a>(*<span class="keyword">this</span>);</div><div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;</div><div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;    <span class="comment">// need to release the shader, otherwise doesn&#39;t draw right</span></div><div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;    <span class="keywordflow">if</span> (_current_shader != 0) {</div><div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;        _current_shader-&gt;<a class="code" href="classShipCAD_1_1Shader.html#a0f41d7628964320846101cf5938a928e">release</a>();</div><div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;        _current_shader = 0;</div><div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;    }</div><div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;}</div><div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;</div><div class="line"><a name="l00232"></a><span class="lineno"><a class="line" href="classShipCAD_1_1Viewport.html#a0720a01f8650dc4acf89aad0649d9196">  232</a></span>&#160;<a class="code" href="classShipCAD_1_1LineShader.html">LineShader</a>* <a class="code" href="classShipCAD_1_1Viewport.html#a0720a01f8650dc4acf89aad0649d9196">Viewport::setLineShader</a>()</div><div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;{</div><div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;    <a class="code" href="classShipCAD_1_1LineShader.html">LineShader</a>* shader = <span class="keyword">dynamic_cast&lt;</span><a class="code" href="classShipCAD_1_1LineShader.html">LineShader</a>*<span class="keyword">&gt;</span>(_shaders[<span class="stringliteral">&quot;lineshader&quot;</span>]);</div><div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;    <span class="keywordflow">if</span> (shader == _current_shader)</div><div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;        <span class="keywordflow">return</span> shader;</div><div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;    <span class="keywordflow">if</span> (_current_shader != 0)</div><div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;        _current_shader-&gt;<a class="code" href="classShipCAD_1_1Shader.html#a0f41d7628964320846101cf5938a928e">release</a>();</div><div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;    shader-&gt;<a class="code" href="classShipCAD_1_1Shader.html#a00c06ead1e413d5d5ecbced82478f753">bind</a>();</div><div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;    shader-&gt;<a class="code" href="classShipCAD_1_1LineShader.html#ac0ee7d9d9f4fa7e4d233c2426c756a68">setMatrix</a>(_view-&gt;<a class="code" href="classShipCAD_1_1ViewportView.html#a0be1613b2ae2087da00811f2bdb0bd45">getWorld</a>());</div><div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;    _current_shader = shader;</div><div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;    <span class="keywordflow">return</span> shader;</div><div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;}</div><div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;</div><div class="line"><a name="l00245"></a><span class="lineno"><a class="line" href="classShipCAD_1_1Viewport.html#ad6be617bdcab76cd2f44b0528371cd5d">  245</a></span>&#160;<a class="code" href="classShipCAD_1_1FaceShader.html">FaceShader</a>* <a class="code" href="classShipCAD_1_1Viewport.html#ad6be617bdcab76cd2f44b0528371cd5d">Viewport::setMonoFaceShader</a>()</div><div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;{</div><div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;    <a class="code" href="classShipCAD_1_1MonoFaceShader.html">MonoFaceShader</a>* shader = <span class="keyword">dynamic_cast&lt;</span><a class="code" href="classShipCAD_1_1MonoFaceShader.html">MonoFaceShader</a>*<span class="keyword">&gt;</span>(_shaders[<span class="stringliteral">&quot;monofaceshader&quot;</span>]);</div><div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;    <span class="keywordflow">if</span> (shader == _current_shader)</div><div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;        <span class="keywordflow">return</span> shader;</div><div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;    <span class="keywordflow">if</span> (_current_shader != 0)</div><div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;        _current_shader-&gt;<a class="code" href="classShipCAD_1_1Shader.html#a0f41d7628964320846101cf5938a928e">release</a>();</div><div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;    shader-&gt;<a class="code" href="classShipCAD_1_1Shader.html#a00c06ead1e413d5d5ecbced82478f753">bind</a>();</div><div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;    shader-&gt;<a class="code" href="classShipCAD_1_1MonoFaceShader.html#a9fee4d776ac7604b35b868c2a4421d92">setMatrix</a>(_view-&gt;<a class="code" href="classShipCAD_1_1ViewportView.html#a0be1613b2ae2087da00811f2bdb0bd45">getWorld</a>());</div><div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;    _current_shader = shader;</div><div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;    <span class="keywordflow">return</span> shader;</div><div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;}</div><div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;</div><div class="line"><a name="l00258"></a><span class="lineno"><a class="line" href="classShipCAD_1_1Viewport.html#a03cc2ed85178b9735c80b11dceb470b5">  258</a></span>&#160;<a class="code" href="classShipCAD_1_1FaceShader.html">FaceShader</a>* <a class="code" href="classShipCAD_1_1Viewport.html#a03cc2ed85178b9735c80b11dceb470b5">Viewport::setLightedFaceShader</a>()</div><div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;{</div><div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;    <a class="code" href="classShipCAD_1_1LightedFaceShader.html">LightedFaceShader</a>* shader = <span class="keyword">dynamic_cast&lt;</span><a class="code" href="classShipCAD_1_1LightedFaceShader.html">LightedFaceShader</a>*<span class="keyword">&gt;</span>(_shaders[<span class="stringliteral">&quot;lightedfaceshader&quot;</span>]);</div><div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;    <span class="keywordflow">if</span> (shader == _current_shader)</div><div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;        <span class="keywordflow">return</span> shader;</div><div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;    <span class="keywordflow">if</span> (_current_shader != 0)</div><div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;        _current_shader-&gt;<a class="code" href="classShipCAD_1_1Shader.html#a0f41d7628964320846101cf5938a928e">release</a>();</div><div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;    shader-&gt;<a class="code" href="classShipCAD_1_1Shader.html#a00c06ead1e413d5d5ecbced82478f753">bind</a>();</div><div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;    shader-&gt;<a class="code" href="classShipCAD_1_1LightedFaceShader.html#a0a5515fd6bcaf380de2ff15b42261f83">setMatrices</a>(_view-&gt;<a class="code" href="classShipCAD_1_1ViewportView.html#af87bb73f78d5393d013708542eb184ae">getProj</a>(), _view-&gt;<a class="code" href="classShipCAD_1_1ViewportView.html#a7e3e335818a369e64989f20d7a8dda4f">getView</a>(), _view-&gt;<a class="code" href="classShipCAD_1_1ViewportView.html#a0be1613b2ae2087da00811f2bdb0bd45">getWorld</a>());</div><div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;    _current_shader = shader;</div><div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;    <span class="keywordflow">return</span> shader;</div><div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;}</div><div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;</div><div class="line"><a name="l00271"></a><span class="lineno"><a class="line" href="classShipCAD_1_1Viewport.html#af4f3c9649b9d1af1b149048fc99aebe9">  271</a></span>&#160;<a class="code" href="classShipCAD_1_1CurveFaceShader.html">CurveFaceShader</a>* <a class="code" href="classShipCAD_1_1Viewport.html#af4f3c9649b9d1af1b149048fc99aebe9">Viewport::setCurveFaceShader</a>()</div><div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;{</div><div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;    <a class="code" href="classShipCAD_1_1CurveFaceShader.html">CurveFaceShader</a>* shader = <span class="keyword">dynamic_cast&lt;</span><a class="code" href="classShipCAD_1_1CurveFaceShader.html">CurveFaceShader</a>*<span class="keyword">&gt;</span>(_shaders[<span class="stringliteral">&quot;curvefaceshader&quot;</span>]);</div><div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;    <span class="keywordflow">if</span> (shader == _current_shader)</div><div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;        <span class="keywordflow">return</span> shader;</div><div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;    <span class="keywordflow">if</span> (_current_shader != 0)</div><div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;        _current_shader-&gt;<a class="code" href="classShipCAD_1_1Shader.html#a0f41d7628964320846101cf5938a928e">release</a>();</div><div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;    shader-&gt;<a class="code" href="classShipCAD_1_1Shader.html#a00c06ead1e413d5d5ecbced82478f753">bind</a>();</div><div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;    shader-&gt;<a class="code" href="classShipCAD_1_1CurveFaceShader.html#aff6cca39c6e9c17c7dee2040724c5946">setMatrices</a>(_view-&gt;<a class="code" href="classShipCAD_1_1ViewportView.html#af87bb73f78d5393d013708542eb184ae">getProj</a>(), _view-&gt;<a class="code" href="classShipCAD_1_1ViewportView.html#a7e3e335818a369e64989f20d7a8dda4f">getView</a>(), _view-&gt;<a class="code" href="classShipCAD_1_1ViewportView.html#a0be1613b2ae2087da00811f2bdb0bd45">getWorld</a>());</div><div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;    _current_shader = shader;</div><div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;    <span class="keywordflow">return</span> shader;</div><div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;}</div><div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;</div><div class="line"><a name="l00284"></a><span class="lineno"><a class="line" href="classShipCAD_1_1Viewport.html#ab247f28eb569e160142901b6eef265a3">  284</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="classShipCAD_1_1Viewport.html#ab247f28eb569e160142901b6eef265a3">Viewport::contextMenu</a>(QMouseEvent *<a class="code" href="classOpenGLWindow.html#a1e3045cffb900de55b7384f5091c9d94">event</a>)</div><div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;{</div><div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;    <a class="code" href="classShipCAD_1_1ViewportContextEvent.html">ViewportContextEvent</a> cevent(<span class="keyword">this</span>, event);</div><div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;    emit <a class="code" href="classShipCAD_1_1Viewport.html#a910ae7ca3acc3a55ae4920ed57305a01">contextMenuEvent</a>(&amp;cevent);</div><div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;    <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;}</div><div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;</div><div class="line"><a name="l00291"></a><span class="lineno"><a class="line" href="classShipCAD_1_1Viewport.html#af9b33616bfc97332f37acafe48ed4c9f">  291</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="classShipCAD_1_1Viewport.html#af9b33616bfc97332f37acafe48ed4c9f">Viewport::canPick</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;<span class="keyword"></span>{</div><div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="classShipCAD_1_1Viewport.html#a205e5082395c6d01660ffc179c57b83e">getViewportMode</a>() == <a class="code" href="namespaceShipCAD.html#a67437198ee14f74e6c5277d761894863a109cd328af19be260371a7e5333043f8">vmWireFrame</a></div><div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;        &amp;&amp; <a class="code" href="classShipCAD_1_1Viewport.html#ae8cc8dfbda37517c2af3821cd87deb74">getController</a>()-&gt;<a class="code" href="classShipCAD_1_1Controller.html#a7868a3bac4ed86abff1fe5a0fabb4abd">getModel</a>()-&gt;<a class="code" href="classShipCAD_1_1ShipCADModel.html#a50cca4c783baeba58c8068c9b8a5d6a4">getVisibility</a>().<a class="code" href="classShipCAD_1_1Visibility.html#a177cc880657723c1cbcc4c66c16ee208">isShowControlNet</a>();</div><div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;}</div><div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;</div><div class="line"><a name="l00297"></a><span class="lineno"><a class="line" href="classShipCAD_1_1Viewport.html#a7a09a47962bcd93cff4e390206ec7560">  297</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="classShipCAD_1_1Viewport.html#a7a09a47962bcd93cff4e390206ec7560">Viewport::canPickFace</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;<span class="keyword"></span>{</div><div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="classShipCAD_1_1Viewport.html#a205e5082395c6d01660ffc179c57b83e">getViewportMode</a>() == <a class="code" href="namespaceShipCAD.html#a67437198ee14f74e6c5277d761894863a109cd328af19be260371a7e5333043f8">vmWireFrame</a></div><div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;        &amp;&amp; <a class="code" href="classShipCAD_1_1Viewport.html#ae8cc8dfbda37517c2af3821cd87deb74">getController</a>()-&gt;<a class="code" href="classShipCAD_1_1Controller.html#a7868a3bac4ed86abff1fe5a0fabb4abd">getModel</a>()-&gt;<a class="code" href="classShipCAD_1_1ShipCADModel.html#a50cca4c783baeba58c8068c9b8a5d6a4">getVisibility</a>().<a class="code" href="classShipCAD_1_1Visibility.html#a63588a3b8aa0a7dd37b19173a4802b47">isShowInteriorEdges</a>();</div><div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;}</div><div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;</div><div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;<span class="comment">// keep track of drag state as fallows:</span></div><div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;<span class="comment">// _drag_state = 0      no dragging, move or pick in progress</span></div><div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;<span class="comment">// _drag_state = 1      button has been pressed, not moved far enough for a drag</span></div><div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;<span class="comment">// _drag_state = 2      button has been pressed, and dragging</span></div><div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;<span class="comment">// _drag_state = 3      left button has been pressed, dragging point. not moved far enough for a drag</span></div><div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;<span class="comment">// _drag_state = 4      left button has been pressed, dragging point</span></div><div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;<span class="comment">// _drag_state = 5      left button pressed, multi selecting, got a point on press</span></div><div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160;<span class="keywordtype">void</span></div><div class="line"><a name="l00311"></a><span class="lineno"><a class="line" href="classShipCAD_1_1Viewport.html#a0dddc5b05c7308f8818a726b16a7d9eb">  311</a></span>&#160;<a class="code" href="classShipCAD_1_1Viewport.html#a0dddc5b05c7308f8818a726b16a7d9eb">Viewport::mousePressEvent</a>(QMouseEvent *<a class="code" href="classOpenGLWindow.html#a1e3045cffb900de55b7384f5091c9d94">event</a>)</div><div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160;{</div><div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;<span class="comment">//    cout &lt;&lt; &quot;mouse press enter:&quot; &lt;&lt; _drag_state &lt;&lt; endl;</span></div><div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160;    _drag_state = 1;</div><div class="line"><a name="l00315"></a><span class="lineno">  315</span>&#160;    <span class="comment">// on a left mouse press, check for selection</span></div><div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;    <span class="keywordflow">if</span> (event-&gt;buttons().testFlag(Qt::LeftButton)) {</div><div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160;        cout &lt;&lt; <span class="stringliteral">&quot;left mouse&quot;</span> &lt;&lt; endl;</div><div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;        <span class="comment">// check for shift-alt to create a flowline</span></div><div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;        <span class="keywordflow">if</span> (event-&gt;modifiers() == (Qt::AltModifier | Qt::ShiftModifier) &amp;&amp; <a class="code" href="classShipCAD_1_1Viewport.html#a5f261a1925f09917013e8e532688326a">getViewportType</a>() != <a class="code" href="namespaceShipCAD.html#aeeeb05810f2e31ef89fd4ac6b6ba9c0aaccdacbf26c0ffe78ae55326537a28dc1">fvPerspective</a>) {</div><div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;            cout &lt;&lt; <span class="stringliteral">&quot;shift-alt&quot;</span> &lt;&lt; endl;</div><div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;            <span class="comment">// convert mouse position back to 2D world coordinates</span></div><div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;            QVector2D pos = _view-&gt;<a class="code" href="classShipCAD_1_1ViewportView.html#a2bc94791273d6134566a386f2a735e37">projectTo3D</a>(event-&gt;pos(), width(), height());</div><div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160;            _ctl-&gt;<a class="code" href="classShipCAD_1_1Controller.html#acdf0f8352ab57d4b52c40193f031909b">addFlowline</a>(pos, *<span class="keyword">this</span>);</div><div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;        } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00325"></a><span class="lineno">  325</span>&#160;            <span class="comment">// find multi select, and only pick points</span></div><div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160;            <a class="code" href="structShipCAD_1_1PickRay.html">PickRay</a> ray(event-&gt;modifiers() == Qt::ControlModifier, <span class="keyword">true</span>, <span class="keyword">false</span>, <span class="keyword">false</span>);</div><div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160;            <span class="keywordflow">if</span> (<a class="code" href="classShipCAD_1_1Viewport.html#af9b33616bfc97332f37acafe48ed4c9f">canPick</a>() &amp;&amp; _view-&gt;<a class="code" href="classShipCAD_1_1ViewportView.html#a4c2e113c5c0e58bb72576a8a802f5a29">leftMousePick</a>(event-&gt;pos(), width(), height(), ray)) {</div><div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160;                cout &lt;&lt; <span class="stringliteral">&quot;pick state changed - multisel:&quot;</span> &lt;&lt; ray.<a class="code" href="structShipCAD_1_1PickRay.html#a5b5dbf3de2afc804978a5e35ac582028">multi_sel</a> &lt;&lt; endl;</div><div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160;                <a class="code" href="classShipCAD_1_1Viewport.html#a7997e0e684a4f8b5709f4d98be6cebb4">update</a>();</div><div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160;                <span class="keywordflow">if</span> (ray.multi_sel)</div><div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;                    _drag_state = 5;</div><div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;                <span class="keywordflow">else</span></div><div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;                    _drag_state = 3;</div><div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;            }</div><div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;        }</div><div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;    }</div><div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;    _prev_pos = <span class="keyword">event</span>-&gt;pos();</div><div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;    _prev_buttons = <span class="keyword">event</span>-&gt;buttons();</div><div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;    _drag_start = <span class="keyword">event</span>-&gt;pos();</div><div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;    <span class="comment">// are we getting mouse clicks in the gl window?</span></div><div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;<span class="comment">//    cout &lt;&lt; &quot;mouse press exit: &quot; &lt;&lt; _drag_state &lt;&lt; &quot; pos:&quot; &lt;&lt; event-&gt;pos().x() &lt;&lt; &quot;,&quot; &lt;&lt; event-&gt;pos().y() &lt;&lt; endl;</span></div><div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;}</div><div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;</div><div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;<span class="keywordtype">void</span></div><div class="line"><a name="l00345"></a><span class="lineno"><a class="line" href="classShipCAD_1_1Viewport.html#a7cb6994a92d40990b58be272953b9120">  345</a></span>&#160;<a class="code" href="classShipCAD_1_1Viewport.html#a7cb6994a92d40990b58be272953b9120">Viewport::mouseReleaseEvent</a>(QMouseEvent *<a class="code" href="classOpenGLWindow.html#a1e3045cffb900de55b7384f5091c9d94">event</a>)</div><div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160;{</div><div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;<span class="comment">//    cout &lt;&lt; &quot;mouse release enter:&quot; &lt;&lt; _drag_state &lt;&lt; endl;</span></div><div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160;    <span class="keywordtype">bool</span> view_changed = <span class="keyword">false</span>;</div><div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;    <span class="comment">// for mouse release, the button released won&#39;t be in the set</span></div><div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;    <span class="keywordflow">if</span> (_prev_buttons.testFlag(Qt::LeftButton) &amp;&amp; !<span class="keyword">event</span>-&gt;buttons().testFlag(Qt::LeftButton)) {</div><div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;        <span class="keywordflow">if</span> (_drag_state == 1) {</div><div class="line"><a name="l00352"></a><span class="lineno">  352</span>&#160;            <span class="comment">// no movement, or not far enough to drag</span></div><div class="line"><a name="l00353"></a><span class="lineno">  353</span>&#160;            <span class="comment">// a point could have been picked in mouse down, if not multi selecting</span></div><div class="line"><a name="l00354"></a><span class="lineno">  354</span>&#160;            <a class="code" href="structShipCAD_1_1PickRay.html">PickRay</a> ray(event-&gt;modifiers() == Qt::ControlModifier, <span class="keyword">false</span>, <span class="keyword">true</span>, <a class="code" href="classShipCAD_1_1Viewport.html#a7a09a47962bcd93cff4e390206ec7560">canPickFace</a>());</div><div class="line"><a name="l00355"></a><span class="lineno">  355</span>&#160;            <span class="keywordflow">if</span> ((<a class="code" href="classShipCAD_1_1Viewport.html#af9b33616bfc97332f37acafe48ed4c9f">canPick</a>() || <a class="code" href="classShipCAD_1_1Viewport.html#a7a09a47962bcd93cff4e390206ec7560">canPickFace</a>())</div><div class="line"><a name="l00356"></a><span class="lineno">  356</span>&#160;                &amp;&amp; _view-&gt;<a class="code" href="classShipCAD_1_1ViewportView.html#a4c2e113c5c0e58bb72576a8a802f5a29">leftMousePick</a>(event-&gt;pos(), width(), height(), ray)) {</div><div class="line"><a name="l00357"></a><span class="lineno">  357</span>&#160;                cout &lt;&lt; <span class="stringliteral">&quot;pick on release: multisel:&quot;</span> &lt;&lt; ray.<a class="code" href="structShipCAD_1_1PickRay.html#a5b5dbf3de2afc804978a5e35ac582028">multi_sel</a> &lt;&lt; endl;</div><div class="line"><a name="l00358"></a><span class="lineno">  358</span>&#160;                <a class="code" href="classShipCAD_1_1Viewport.html#a7997e0e684a4f8b5709f4d98be6cebb4">update</a>();</div><div class="line"><a name="l00359"></a><span class="lineno">  359</span>&#160;            }</div><div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160;        }</div><div class="line"><a name="l00361"></a><span class="lineno">  361</span>&#160;        <span class="comment">// drag state = 2, 3, 4, 5 no picking</span></div><div class="line"><a name="l00362"></a><span class="lineno">  362</span>&#160;        <span class="comment">// 5 is no picking as even though multiselect, we got it on mouse down</span></div><div class="line"><a name="l00363"></a><span class="lineno">  363</span>&#160;        <span class="keywordflow">else</span> {</div><div class="line"><a name="l00364"></a><span class="lineno">  364</span>&#160;            <span class="comment">// dragging view or point</span></div><div class="line"><a name="l00365"></a><span class="lineno">  365</span>&#160;            view_changed = _view-&gt;<a class="code" href="classShipCAD_1_1ViewportView.html#ad74e96e8fef750466b2771f8fc48900a">leftMouseRelease</a>(event-&gt;pos(), width(), height());</div><div class="line"><a name="l00366"></a><span class="lineno">  366</span>&#160;            <span class="keywordflow">if</span> (_drag_state == 4) <span class="comment">// dragging point</span></div><div class="line"><a name="l00367"></a><span class="lineno">  367</span>&#160;                <a class="code" href="classShipCAD_1_1Viewport.html#ae8cc8dfbda37517c2af3821cd87deb74">getController</a>()-&gt;<a class="code" href="classShipCAD_1_1Controller.html#ac7684b3ff9abd0fa80f9ab0c95458a03">stopMovePoint</a>();</div><div class="line"><a name="l00368"></a><span class="lineno">  368</span>&#160;        }</div><div class="line"><a name="l00369"></a><span class="lineno">  369</span>&#160;    }</div><div class="line"><a name="l00370"></a><span class="lineno">  370</span>&#160;    <span class="keywordflow">else</span> <span class="keywordflow">if</span> (_prev_buttons.testFlag(Qt::RightButton) &amp;&amp; !<span class="keyword">event</span>-&gt;buttons().testFlag(Qt::RightButton)) {</div><div class="line"><a name="l00371"></a><span class="lineno">  371</span>&#160;        <span class="keywordflow">if</span> (_drag_state == 1)</div><div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160;            view_changed = <a class="code" href="classShipCAD_1_1Viewport.html#ab247f28eb569e160142901b6eef265a3">contextMenu</a>(event);</div><div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;        <span class="keywordflow">else</span></div><div class="line"><a name="l00374"></a><span class="lineno">  374</span>&#160;            view_changed = _view-&gt;<a class="code" href="classShipCAD_1_1ViewportView.html#aaeff27f9b32dc7ee98dbfc14b7eca804">rightMouseRelease</a>(event-&gt;pos(), width(), height());</div><div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160;    }</div><div class="line"><a name="l00376"></a><span class="lineno">  376</span>&#160;</div><div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160;    <span class="keywordflow">if</span> (view_changed)</div><div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160;        <a class="code" href="classShipCAD_1_1Viewport.html#a7997e0e684a4f8b5709f4d98be6cebb4">update</a>();</div><div class="line"><a name="l00379"></a><span class="lineno">  379</span>&#160;    _prev_buttons = <span class="keyword">event</span>-&gt;buttons();</div><div class="line"><a name="l00380"></a><span class="lineno">  380</span>&#160;    <span class="comment">// are we getting mouse clicks in the gl window?</span></div><div class="line"><a name="l00381"></a><span class="lineno">  381</span>&#160;<span class="comment">//    cout &lt;&lt; &quot;mouse release exit: &quot; &lt;&lt; _drag_state &lt;&lt; &quot; pos:&quot; &lt;&lt; event-&gt;pos().x() &lt;&lt; &quot;,&quot; &lt;&lt; event-&gt;pos().y() &lt;&lt; endl;</span></div><div class="line"><a name="l00382"></a><span class="lineno">  382</span>&#160;    _drag_state = 0;</div><div class="line"><a name="l00383"></a><span class="lineno">  383</span>&#160;}</div><div class="line"><a name="l00384"></a><span class="lineno">  384</span>&#160;</div><div class="line"><a name="l00385"></a><span class="lineno">  385</span>&#160;<span class="keywordtype">void</span></div><div class="line"><a name="l00386"></a><span class="lineno"><a class="line" href="classShipCAD_1_1Viewport.html#ab98dde7bb1d923b8cfc9a0c3cb249c2c">  386</a></span>&#160;<a class="code" href="classShipCAD_1_1Viewport.html#ab98dde7bb1d923b8cfc9a0c3cb249c2c">Viewport::mouseMoveEvent</a>(QMouseEvent *<a class="code" href="classOpenGLWindow.html#a1e3045cffb900de55b7384f5091c9d94">event</a>)</div><div class="line"><a name="l00387"></a><span class="lineno">  387</span>&#160;{</div><div class="line"><a name="l00388"></a><span class="lineno">  388</span>&#160;<span class="comment">//    cout &lt;&lt; &quot;mouse move enter:&quot; &lt;&lt; _drag_state &lt;&lt; endl;</span></div><div class="line"><a name="l00389"></a><span class="lineno">  389</span>&#160;</div><div class="line"><a name="l00390"></a><span class="lineno">  390</span>&#160;    <span class="keywordtype">bool</span> view_changed = <span class="keyword">false</span>;</div><div class="line"><a name="l00391"></a><span class="lineno">  391</span>&#160;</div><div class="line"><a name="l00392"></a><span class="lineno">  392</span>&#160;    <span class="comment">// check for actual dragging</span></div><div class="line"><a name="l00393"></a><span class="lineno">  393</span>&#160;    <span class="keywordflow">if</span> (_drag_state == 0 || _drag_state == 5</div><div class="line"><a name="l00394"></a><span class="lineno">  394</span>&#160;        || (_drag_state == 1 &amp;&amp; (event-&gt;pos() - _drag_start).manhattanLength() &lt; QApplication::startDragDistance())</div><div class="line"><a name="l00395"></a><span class="lineno">  395</span>&#160;        || (_drag_state == 3 &amp;&amp; (event-&gt;pos() - _drag_start).manhattanLength() &lt; QApplication::startDragDistance()))</div><div class="line"><a name="l00396"></a><span class="lineno">  396</span>&#160;        <span class="keywordflow">return</span>;</div><div class="line"><a name="l00397"></a><span class="lineno">  397</span>&#160;</div><div class="line"><a name="l00398"></a><span class="lineno">  398</span>&#160;    <span class="keywordflow">if</span> (_drag_state != 2 &amp;&amp; _drag_state != 4)</div><div class="line"><a name="l00399"></a><span class="lineno">  399</span>&#160;        _drag_state = _drag_state == 1 ? 2 : 4;</div><div class="line"><a name="l00400"></a><span class="lineno">  400</span>&#160;</div><div class="line"><a name="l00401"></a><span class="lineno">  401</span>&#160;    <span class="keywordflow">if</span> (event-&gt;buttons().testFlag(Qt::LeftButton)) {</div><div class="line"><a name="l00402"></a><span class="lineno">  402</span>&#160;        <span class="comment">// are we dragging a point?</span></div><div class="line"><a name="l00403"></a><span class="lineno">  403</span>&#160;        <span class="keywordflow">if</span> (_drag_state == 4) {</div><div class="line"><a name="l00404"></a><span class="lineno">  404</span>&#160;            QVector3D coordchg;</div><div class="line"><a name="l00405"></a><span class="lineno">  405</span>&#160;            <span class="keywordflow">if</span> (_view-&gt;<a class="code" href="classShipCAD_1_1ViewportView.html#a6991b6b121b609ec7d18518a8f872859">pointDrag</a>(event-&gt;pos(), width(), height(), coordchg)) {</div><div class="line"><a name="l00406"></a><span class="lineno">  406</span>&#160;                <span class="comment">// the point has been dragged</span></div><div class="line"><a name="l00407"></a><span class="lineno">  407</span>&#160;                <a class="code" href="classShipCAD_1_1Viewport.html#ae8cc8dfbda37517c2af3821cd87deb74">getController</a>()-&gt;<a class="code" href="classShipCAD_1_1Controller.html#a8f573f351b3f9568618e44ab39fb2a7e">movePoint</a>(coordchg);</div><div class="line"><a name="l00408"></a><span class="lineno">  408</span>&#160;            }</div><div class="line"><a name="l00409"></a><span class="lineno">  409</span>&#160;        }</div><div class="line"><a name="l00410"></a><span class="lineno">  410</span>&#160;        <span class="keywordflow">else</span> {</div><div class="line"><a name="l00411"></a><span class="lineno">  411</span>&#160;            view_changed = _view-&gt;<a class="code" href="classShipCAD_1_1ViewportView.html#a2dc46f8d032d707308cf853c70bc965a">leftMouseMove</a>(event-&gt;pos(), _prev_pos, width(), height());</div><div class="line"><a name="l00412"></a><span class="lineno">  412</span>&#160;        }</div><div class="line"><a name="l00413"></a><span class="lineno">  413</span>&#160;    }</div><div class="line"><a name="l00414"></a><span class="lineno">  414</span>&#160;    <span class="keywordflow">else</span> <span class="keywordflow">if</span> (event-&gt;buttons().testFlag(Qt::MidButton)) {</div><div class="line"><a name="l00415"></a><span class="lineno">  415</span>&#160;        view_changed = _view-&gt;<a class="code" href="classShipCAD_1_1ViewportView.html#a44baf7aad8a3ba7ded04395a8765caf9">middleMouseMove</a>(event-&gt;pos(), _prev_pos, width(), height());</div><div class="line"><a name="l00416"></a><span class="lineno">  416</span>&#160;    }</div><div class="line"><a name="l00417"></a><span class="lineno">  417</span>&#160;    <span class="keywordflow">else</span> <span class="keywordflow">if</span> (event-&gt;buttons().testFlag(Qt::RightButton)) {</div><div class="line"><a name="l00418"></a><span class="lineno">  418</span>&#160;        view_changed = _view-&gt;<a class="code" href="classShipCAD_1_1ViewportView.html#a537210f7c2872e7b8921341660e85347">rightMouseMove</a>(event-&gt;pos(), _prev_pos, width(), height());</div><div class="line"><a name="l00419"></a><span class="lineno">  419</span>&#160;    }</div><div class="line"><a name="l00420"></a><span class="lineno">  420</span>&#160;</div><div class="line"><a name="l00421"></a><span class="lineno">  421</span>&#160;    <span class="keywordflow">if</span> (view_changed)</div><div class="line"><a name="l00422"></a><span class="lineno">  422</span>&#160;        <a class="code" href="classShipCAD_1_1Viewport.html#a7997e0e684a4f8b5709f4d98be6cebb4">update</a>();</div><div class="line"><a name="l00423"></a><span class="lineno">  423</span>&#160;</div><div class="line"><a name="l00424"></a><span class="lineno">  424</span>&#160;    _prev_pos = <span class="keyword">event</span>-&gt;pos();</div><div class="line"><a name="l00425"></a><span class="lineno">  425</span>&#160;    <span class="comment">// are we getting mouse clicks in the gl window?</span></div><div class="line"><a name="l00426"></a><span class="lineno">  426</span>&#160;<span class="comment">//    cout &lt;&lt; &quot;mouse move exit:&quot; &lt;&lt; _drag_state &lt;&lt; &quot; pos:&quot; &lt;&lt; event-&gt;pos().x() &lt;&lt; &quot;,&quot; &lt;&lt; event-&gt;pos().y() &lt;&lt; endl;</span></div><div class="line"><a name="l00427"></a><span class="lineno">  427</span>&#160;}</div><div class="line"><a name="l00428"></a><span class="lineno">  428</span>&#160;</div><div class="line"><a name="l00429"></a><span class="lineno"><a class="line" href="classShipCAD_1_1Viewport.html#a9ac4c18fa3454cddc5e73322c3d1afd8">  429</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classShipCAD_1_1Viewport.html#a9ac4c18fa3454cddc5e73322c3d1afd8">Viewport::wheelEvent</a>(QWheelEvent *<a class="code" href="classOpenGLWindow.html#a1e3045cffb900de55b7384f5091c9d94">event</a>)</div><div class="line"><a name="l00430"></a><span class="lineno">  430</span>&#160;{</div><div class="line"><a name="l00431"></a><span class="lineno">  431</span>&#160;    <span class="comment">//QPoint num_pixels = event-&gt;pixelDelta();</span></div><div class="line"><a name="l00432"></a><span class="lineno">  432</span>&#160;    QPoint num_degrees = <span class="keyword">event</span>-&gt;angleDelta() / 8;</div><div class="line"><a name="l00433"></a><span class="lineno">  433</span>&#160;</div><div class="line"><a name="l00434"></a><span class="lineno">  434</span>&#160;    <span class="keywordtype">bool</span> view_changed = <span class="keyword">false</span>;</div><div class="line"><a name="l00435"></a><span class="lineno">  435</span>&#160;    </div><div class="line"><a name="l00436"></a><span class="lineno">  436</span>&#160;    <span class="comment">//if (!num_pixels.isNull())</span></div><div class="line"><a name="l00437"></a><span class="lineno">  437</span>&#160;    <span class="comment">//view_changed = _view-&gt;wheelWithPixels(num_pixels, width(), height());</span></div><div class="line"><a name="l00438"></a><span class="lineno">  438</span>&#160;    <span class="keywordflow">if</span> (!num_degrees.isNull())</div><div class="line"><a name="l00439"></a><span class="lineno">  439</span>&#160;        view_changed = _view-&gt;<a class="code" href="classShipCAD_1_1ViewportView.html#a77ce1c6a0216a791ee2ae79dd6674cde">wheelWithDegrees</a>(num_degrees, width(), height());</div><div class="line"><a name="l00440"></a><span class="lineno">  440</span>&#160;</div><div class="line"><a name="l00441"></a><span class="lineno">  441</span>&#160;    <span class="keywordflow">if</span> (view_changed)</div><div class="line"><a name="l00442"></a><span class="lineno">  442</span>&#160;        <a class="code" href="classShipCAD_1_1Viewport.html#a7997e0e684a4f8b5709f4d98be6cebb4">update</a>();</div><div class="line"><a name="l00443"></a><span class="lineno">  443</span>&#160;        </div><div class="line"><a name="l00444"></a><span class="lineno">  444</span>&#160;}</div><div class="line"><a name="l00445"></a><span class="lineno">  445</span>&#160;</div><div class="line"><a name="l00446"></a><span class="lineno"><a class="line" href="classShipCAD_1_1Viewport.html#acc401d8a0d84810a9d695e3621e29b4e">  446</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classShipCAD_1_1Viewport.html#acc401d8a0d84810a9d695e3621e29b4e">Viewport::keyPressEvent</a>(QKeyEvent *<a class="code" href="classOpenGLWindow.html#a1e3045cffb900de55b7384f5091c9d94">event</a>)</div><div class="line"><a name="l00447"></a><span class="lineno">  447</span>&#160;{</div><div class="line"><a name="l00448"></a><span class="lineno">  448</span>&#160;    <span class="keywordflow">if</span> (event-&gt;modifiers().testFlag(Qt::ControlModifier) &amp;&amp; <span class="keyword">event</span>-&gt;key() == Qt::Key_A) {</div><div class="line"><a name="l00449"></a><span class="lineno">  449</span>&#160;        _view-&gt;<a class="code" href="classShipCAD_1_1ViewportView.html#ab70e778772325a67610d983f630c2c3d">resetView</a>();</div><div class="line"><a name="l00450"></a><span class="lineno">  450</span>&#160;        <a class="code" href="classShipCAD_1_1Viewport.html#a7997e0e684a4f8b5709f4d98be6cebb4">update</a>();</div><div class="line"><a name="l00451"></a><span class="lineno">  451</span>&#160;    }</div><div class="line"><a name="l00452"></a><span class="lineno">  452</span>&#160;}</div><div class="line"><a name="l00453"></a><span class="lineno">  453</span>&#160;</div><div class="line"><a name="l00454"></a><span class="lineno"><a class="line" href="classShipCAD_1_1Viewport.html#aa9af80400534f46e5420916a2895ead5">  454</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="classShipCAD_1_1Viewport.html#aa9af80400534f46e5420916a2895ead5">Viewport::shootPickRay</a>(<a class="code" href="structShipCAD_1_1PickRay.html">PickRay</a>&amp; ray)</div><div class="line"><a name="l00455"></a><span class="lineno">  455</span>&#160;{</div><div class="line"><a name="l00456"></a><span class="lineno">  456</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="classShipCAD_1_1Viewport.html#ae8cc8dfbda37517c2af3821cd87deb74">getController</a>()-&gt;<a class="code" href="classShipCAD_1_1Controller.html#ae09ac41e86659fab53e236f27f2ca761">shootPickRay</a>(*<span class="keyword">this</span>, ray);</div><div class="line"><a name="l00457"></a><span class="lineno">  457</span>&#160;}</div><div class="ttc" id="classShipCAD_1_1Viewport_html_a5f261a1925f09917013e8e532688326a"><div class="ttname"><a href="classShipCAD_1_1Viewport.html#a5f261a1925f09917013e8e532688326a">ShipCAD::Viewport::getViewportType</a></div><div class="ttdeci">viewport_type_t getViewportType() const </div><div class="ttdef"><b>Definition:</b> <a href="viewport_8h_source.html#l00097">viewport.h:97</a></div></div>
<div class="ttc" id="entity_8h_html"><div class="ttname"><a href="entity_8h.html">entity.h</a></div></div>
<div class="ttc" id="classShipCAD_1_1Viewport_html_a886ac5965b63039799827da89bf3de20"><div class="ttname"><a href="classShipCAD_1_1Viewport.html#a886ac5965b63039799827da89bf3de20">ShipCAD::Viewport::addShader</a></div><div class="ttdeci">void addShader(const std::string &amp;name, Shader *shader)</div><div class="ttdef"><b>Definition:</b> <a href="viewport_8cpp_source.html#l00193">viewport.cpp:193</a></div></div>
<div class="ttc" id="classShipCAD_1_1Viewport_html_aa9af80400534f46e5420916a2895ead5"><div class="ttname"><a href="classShipCAD_1_1Viewport.html#aa9af80400534f46e5420916a2895ead5">ShipCAD::Viewport::shootPickRay</a></div><div class="ttdeci">bool shootPickRay(PickRay &amp;ray)</div><div class="ttdef"><b>Definition:</b> <a href="viewport_8cpp_source.html#l00454">viewport.cpp:454</a></div></div>
<div class="ttc" id="classShipCAD_1_1ViewportViewPerspective_html_a76e1128fb2031c44b4d04eecbeace739"><div class="ttname"><a href="classShipCAD_1_1ViewportViewPerspective.html#a76e1128fb2031c44b4d04eecbeace739">ShipCAD::ViewportViewPerspective::getCameraType</a></div><div class="ttdeci">camera_type_t getCameraType() const </div><div class="ttdef"><b>Definition:</b> <a href="viewportview_8h_source.html#l00162">viewportview.h:162</a></div></div>
<div class="ttc" id="classShipCAD_1_1Viewport_html_a0720a01f8650dc4acf89aad0649d9196"><div class="ttname"><a href="classShipCAD_1_1Viewport.html#a0720a01f8650dc4acf89aad0649d9196">ShipCAD::Viewport::setLineShader</a></div><div class="ttdeci">LineShader * setLineShader()</div><div class="ttdef"><b>Definition:</b> <a href="viewport_8cpp_source.html#l00232">viewport.cpp:232</a></div></div>
<div class="ttc" id="classShipCAD_1_1Viewport_html_ad6be617bdcab76cd2f44b0528371cd5d"><div class="ttname"><a href="classShipCAD_1_1Viewport.html#ad6be617bdcab76cd2f44b0528371cd5d">ShipCAD::Viewport::setMonoFaceShader</a></div><div class="ttdeci">FaceShader * setMonoFaceShader()</div><div class="ttdef"><b>Definition:</b> <a href="viewport_8cpp_source.html#l00245">viewport.cpp:245</a></div></div>
<div class="ttc" id="classShipCAD_1_1Controller_html"><div class="ttname"><a href="classShipCAD_1_1Controller.html">ShipCAD::Controller</a></div><div class="ttdoc">ShipCAD model controller, contains editing actions. </div><div class="ttdef"><b>Definition:</b> <a href="controller_8h_source.html#l00054">controller.h:54</a></div></div>
<div class="ttc" id="classShipCAD_1_1ShipCADModel_html_aa6af8872deba5b401ac575a85901a265"><div class="ttname"><a href="classShipCAD_1_1ShipCADModel.html#aa6af8872deba5b401ac575a85901a265">ShipCAD::ShipCADModel::getPreferences</a></div><div class="ttdeci">Preferences &amp; getPreferences()</div><div class="ttdef"><b>Definition:</b> <a href="shipcadmodel_8h_source.html#l00077">shipcadmodel.h:77</a></div></div>
<div class="ttc" id="classShipCAD_1_1ShipCADModel_html_aa7d2417dcc847ccf0f72d57eb333410e"><div class="ttname"><a href="classShipCAD_1_1ShipCADModel.html#aa7d2417dcc847ccf0f72d57eb333410e">ShipCAD::ShipCADModel::drawWithPainter</a></div><div class="ttdeci">void drawWithPainter(Viewport &amp;vp, QPainter *painter)</div><div class="ttdef"><b>Definition:</b> <a href="shipcadmodel_8cpp_source.html#l00462">shipcadmodel.cpp:462</a></div></div>
<div class="ttc" id="classShipCAD_1_1ViewportView_html_ad1c89a6e34b7b3795a7f21e67181dc0f"><div class="ttname"><a href="classShipCAD_1_1ViewportView.html#ad1c89a6e34b7b3795a7f21e67181dc0f">ShipCAD::ViewportView::initializeViewport</a></div><div class="ttdeci">virtual void initializeViewport(const QVector3D &amp;min, const QVector3D &amp;max, int width, int height)=0</div></div>
<div class="ttc" id="classShipCAD_1_1ViewportView_html_ad74e96e8fef750466b2771f8fc48900a"><div class="ttname"><a href="classShipCAD_1_1ViewportView.html#ad74e96e8fef750466b2771f8fc48900a">ShipCAD::ViewportView::leftMouseRelease</a></div><div class="ttdeci">virtual bool leftMouseRelease(QPoint pos, int w, int h)</div><div class="ttdef"><b>Definition:</b> <a href="viewportview_8cpp_source.html#l00108">viewportview.cpp:108</a></div></div>
<div class="ttc" id="namespaceShipCAD_html_aeeeb05810f2e31ef89fd4ac6b6ba9c0aaccdacbf26c0ffe78ae55326537a28dc1"><div class="ttname"><a href="namespaceShipCAD.html#aeeeb05810f2e31ef89fd4ac6b6ba9c0aaccdacbf26c0ffe78ae55326537a28dc1">ShipCAD::fvPerspective</a></div><div class="ttdef"><b>Definition:</b> <a href="shipcadlib_8h_source.html#l00074">shipcadlib.h:74</a></div></div>
<div class="ttc" id="classShipCAD_1_1Viewport_html_a00ba2139fa06701b65de70d5c657f5d6"><div class="ttname"><a href="classShipCAD_1_1Viewport.html#a00ba2139fa06701b65de70d5c657f5d6">ShipCAD::Viewport::setAngle</a></div><div class="ttdeci">void setAngle(float val)</div><div class="ttdef"><b>Definition:</b> <a href="viewport_8cpp_source.html#l00147">viewport.cpp:147</a></div></div>
<div class="ttc" id="classShipCAD_1_1ViewportView_html_a2dc46f8d032d707308cf853c70bc965a"><div class="ttname"><a href="classShipCAD_1_1ViewportView.html#a2dc46f8d032d707308cf853c70bc965a">ShipCAD::ViewportView::leftMouseMove</a></div><div class="ttdeci">virtual bool leftMouseMove(QPoint cur, QPoint prev, int w, int h)</div><div class="ttdef"><b>Definition:</b> <a href="viewportview_8cpp_source.html#l00125">viewportview.cpp:125</a></div></div>
<div class="ttc" id="classShipCAD_1_1ViewportView_html_a4c2e113c5c0e58bb72576a8a802f5a29"><div class="ttname"><a href="classShipCAD_1_1ViewportView.html#a4c2e113c5c0e58bb72576a8a802f5a29">ShipCAD::ViewportView::leftMousePick</a></div><div class="ttdeci">virtual bool leftMousePick(QPoint pos, int w, int h, PickRay &amp;ray)</div><div class="ttdef"><b>Definition:</b> <a href="viewportview_8cpp_source.html#l00092">viewportview.cpp:92</a></div></div>
<div class="ttc" id="classShipCAD_1_1Viewport_html_ac0c02d6e3a0933669de2292f041c69e6"><div class="ttname"><a href="classShipCAD_1_1Viewport.html#ac0c02d6e3a0933669de2292f041c69e6">ShipCAD::Viewport::clearBackground</a></div><div class="ttdeci">virtual void clearBackground()</div><div class="ttdoc">clear background </div><div class="ttdef"><b>Definition:</b> <a href="viewport_8cpp_source.html#l00198">viewport.cpp:198</a></div></div>
<div class="ttc" id="classShipCAD_1_1ShipCADModel_html_a50cca4c783baeba58c8068c9b8a5d6a4"><div class="ttname"><a href="classShipCAD_1_1ShipCADModel.html#a50cca4c783baeba58c8068c9b8a5d6a4">ShipCAD::ShipCADModel::getVisibility</a></div><div class="ttdeci">Visibility &amp; getVisibility()</div><div class="ttdef"><b>Definition:</b> <a href="shipcadmodel_8h_source.html#l00074">shipcadmodel.h:74</a></div></div>
<div class="ttc" id="classShipCAD_1_1Viewport_html_a017abe5691674d1d232ad8c012b30339"><div class="ttname"><a href="classShipCAD_1_1Viewport.html#a017abe5691674d1d232ad8c012b30339">ShipCAD::Viewport::getCameraType</a></div><div class="ttdeci">camera_type_t getCameraType() const </div><div class="ttdef"><b>Definition:</b> <a href="viewport_8cpp_source.html#l00112">viewport.cpp:112</a></div></div>
<div class="ttc" id="classShipCAD_1_1SubdivisionSurface_html_abc1cf0168290242dfbe5dd0d178fa7cb"><div class="ttname"><a href="classShipCAD_1_1SubdivisionSurface.html#abc1cf0168290242dfbe5dd0d178fa7cb">ShipCAD::SubdivisionSurface::extents</a></div><div class="ttdeci">virtual void extents(QVector3D &amp;min, QVector3D &amp;max)</div><div class="ttdef"><b>Definition:</b> <a href="subdivsurface_8cpp_source.html#l02210">subdivsurface.cpp:2210</a></div></div>
<div class="ttc" id="namespacestd_html"><div class="ttname"><a href="namespacestd.html">std</a></div><div class="ttdoc">STL namespace. </div></div>
<div class="ttc" id="classShipCAD_1_1MonoFaceShader_html_a9fee4d776ac7604b35b868c2a4421d92"><div class="ttname"><a href="classShipCAD_1_1MonoFaceShader.html#a9fee4d776ac7604b35b868c2a4421d92">ShipCAD::MonoFaceShader::setMatrix</a></div><div class="ttdeci">void setMatrix(const QMatrix4x4 &amp;matrix)</div><div class="ttdef"><b>Definition:</b> <a href="shader_8cpp_source.html#l00202">shader.cpp:202</a></div></div>
<div class="ttc" id="classShipCAD_1_1CurveFaceShader_html"><div class="ttname"><a href="classShipCAD_1_1CurveFaceShader.html">ShipCAD::CurveFaceShader</a></div><div class="ttdef"><b>Definition:</b> <a href="shader_8h_source.html#l00152">shader.h:152</a></div></div>
<div class="ttc" id="classShipCAD_1_1FaceShader_html"><div class="ttname"><a href="classShipCAD_1_1FaceShader.html">ShipCAD::FaceShader</a></div><div class="ttdef"><b>Definition:</b> <a href="shader_8h_source.html#l00097">shader.h:97</a></div></div>
<div class="ttc" id="viewport_8h_html"><div class="ttname"><a href="viewport_8h.html">viewport.h</a></div></div>
<div class="ttc" id="classShipCAD_1_1Viewport_html_a578ac5ee96e36638739517fa21bf70c0"><div class="ttname"><a href="classShipCAD_1_1Viewport.html#a578ac5ee96e36638739517fa21bf70c0">ShipCAD::Viewport::setViewportMode</a></div><div class="ttdeci">void setViewportMode(viewport_mode_t mode)</div><div class="ttdef"><b>Definition:</b> <a href="viewport_8cpp_source.html#l00104">viewport.cpp:104</a></div></div>
<div class="ttc" id="classShipCAD_1_1Visibility_html_a63588a3b8aa0a7dd37b19173a4802b47"><div class="ttname"><a href="classShipCAD_1_1Visibility.html#a63588a3b8aa0a7dd37b19173a4802b47">ShipCAD::Visibility::isShowInteriorEdges</a></div><div class="ttdeci">bool isShowInteriorEdges() const </div><div class="ttdoc">is interior edges shown </div><div class="ttdef"><b>Definition:</b> <a href="visibility_8h_source.html#l00163">visibility.h:163</a></div></div>
<div class="ttc" id="classOpenGLWindow_html_abea9e50147496e5110b86f03122fbece"><div class="ttname"><a href="classOpenGLWindow.html#abea9e50147496e5110b86f03122fbece">OpenGLWindow::renderLater</a></div><div class="ttdeci">void renderLater()</div><div class="ttdef"><b>Definition:</b> <a href="openglwindow_8cpp_source.html#l00097">openglwindow.cpp:97</a></div></div>
<div class="ttc" id="classShipCAD_1_1Controller_html_ac7684b3ff9abd0fa80f9ab0c95458a03"><div class="ttname"><a href="classShipCAD_1_1Controller.html#ac7684b3ff9abd0fa80f9ab0c95458a03">ShipCAD::Controller::stopMovePoint</a></div><div class="ttdeci">void stopMovePoint()</div><div class="ttdoc">method to call when point is no longer being dragged </div><div class="ttdef"><b>Definition:</b> <a href="controller_8cpp_source.html#l01424">controller.cpp:1424</a></div></div>
<div class="ttc" id="classShipCAD_1_1Viewport_html_ad48bfa81c7034792f290ed47bac203c5"><div class="ttname"><a href="classShipCAD_1_1Viewport.html#ad48bfa81c7034792f290ed47bac203c5">ShipCAD::Viewport::renderWithPainter</a></div><div class="ttdeci">virtual void renderWithPainter(QPainter *painter)</div><div class="ttdoc">render qpainter </div><div class="ttdef"><b>Definition:</b> <a href="viewport_8cpp_source.html#l00208">viewport.cpp:208</a></div></div>
<div class="ttc" id="classOpenGLWindow_html_a1e3045cffb900de55b7384f5091c9d94"><div class="ttname"><a href="classOpenGLWindow.html#a1e3045cffb900de55b7384f5091c9d94">OpenGLWindow::event</a></div><div class="ttdeci">bool event(QEvent *event)</div><div class="ttdef"><b>Definition:</b> <a href="openglwindow_8cpp_source.html#l00105">openglwindow.cpp:105</a></div></div>
<div class="ttc" id="classShipCAD_1_1Viewport_html_a5f90a885e0204b32ff9795c4b79f824b"><div class="ttname"><a href="classShipCAD_1_1Viewport.html#a5f90a885e0204b32ff9795c4b79f824b">ShipCAD::Viewport::setCameraType</a></div><div class="ttdeci">void setCameraType(camera_type_t val)</div><div class="ttdef"><b>Definition:</b> <a href="viewport_8cpp_source.html#l00120">viewport.cpp:120</a></div></div>
<div class="ttc" id="classShipCAD_1_1ViewportView_html_ab70e778772325a67610d983f630c2c3d"><div class="ttname"><a href="classShipCAD_1_1ViewportView.html#ab70e778772325a67610d983f630c2c3d">ShipCAD::ViewportView::resetView</a></div><div class="ttdeci">virtual void resetView()</div><div class="ttdef"><b>Definition:</b> <a href="viewportview_8cpp_source.html#l00078">viewportview.cpp:78</a></div></div>
<div class="ttc" id="classShipCAD_1_1ViewportViewPerspective_html_ab1a56bd7cb986e2c3163bcacd201d32d"><div class="ttname"><a href="classShipCAD_1_1ViewportViewPerspective.html#ab1a56bd7cb986e2c3163bcacd201d32d">ShipCAD::ViewportViewPerspective::setCameraType</a></div><div class="ttdeci">void setCameraType(camera_type_t val)</div><div class="ttdef"><b>Definition:</b> <a href="viewportview_8cpp_source.html#l00317">viewportview.cpp:317</a></div></div>
<div class="ttc" id="classShipCAD_1_1Shader_html_a0f41d7628964320846101cf5938a928e"><div class="ttname"><a href="classShipCAD_1_1Shader.html#a0f41d7628964320846101cf5938a928e">ShipCAD::Shader::release</a></div><div class="ttdeci">void release()</div><div class="ttdef"><b>Definition:</b> <a href="shader_8h_source.html#l00063">shader.h:63</a></div></div>
<div class="ttc" id="subdivsurface_8h_html"><div class="ttname"><a href="subdivsurface_8h.html">subdivsurface.h</a></div></div>
<div class="ttc" id="classShipCAD_1_1Viewport_html_a7a09a47962bcd93cff4e390206ec7560"><div class="ttname"><a href="classShipCAD_1_1Viewport.html#a7a09a47962bcd93cff4e390206ec7560">ShipCAD::Viewport::canPickFace</a></div><div class="ttdeci">bool canPickFace() const </div><div class="ttdef"><b>Definition:</b> <a href="viewport_8cpp_source.html#l00297">viewport.cpp:297</a></div></div>
<div class="ttc" id="classShipCAD_1_1Viewport_html"><div class="ttname"><a href="classShipCAD_1_1Viewport.html">ShipCAD::Viewport</a></div><div class="ttdef"><b>Definition:</b> <a href="viewport_8h_source.html#l00070">viewport.h:70</a></div></div>
<div class="ttc" id="classShipCAD_1_1Viewport_html_a554a3455c39ee5652b13c9b24c3c962e"><div class="ttname"><a href="classShipCAD_1_1Viewport.html#a554a3455c39ee5652b13c9b24c3c962e">ShipCAD::Viewport::setViewportType</a></div><div class="ttdeci">void setViewportType(viewport_type_t ty)</div><div class="ttdef"><b>Definition:</b> <a href="viewport_8cpp_source.html#l00129">viewport.cpp:129</a></div></div>
<div class="ttc" id="classShipCAD_1_1Viewport_html_af6af98eae1040b82b047df5a679e891b"><div class="ttname"><a href="classShipCAD_1_1Viewport.html#af6af98eae1040b82b047df5a679e891b">ShipCAD::Viewport::Viewport</a></div><div class="ttdeci">Viewport(ShipCAD::Controller *ctl, viewport_type_t vtype)</div><div class="ttdef"><b>Definition:</b> <a href="viewport_8cpp_source.html#l00054">viewport.cpp:54</a></div></div>
<div class="ttc" id="shader_8h_html"><div class="ttname"><a href="shader_8h.html">shader.h</a></div></div>
<div class="ttc" id="classShipCAD_1_1ViewportView_html_a44baf7aad8a3ba7ded04395a8765caf9"><div class="ttname"><a href="classShipCAD_1_1ViewportView.html#a44baf7aad8a3ba7ded04395a8765caf9">ShipCAD::ViewportView::middleMouseMove</a></div><div class="ttdeci">virtual bool middleMouseMove(QPoint cur, QPoint prev, int w, int h)</div><div class="ttdef"><b>Definition:</b> <a href="viewportview_8cpp_source.html#l00120">viewportview.cpp:120</a></div></div>
<div class="ttc" id="classShipCAD_1_1ViewportView_html_a7e3e335818a369e64989f20d7a8dda4f"><div class="ttname"><a href="classShipCAD_1_1ViewportView.html#a7e3e335818a369e64989f20d7a8dda4f">ShipCAD::ViewportView::getView</a></div><div class="ttdeci">const QMatrix4x4 &amp; getView() const </div><div class="ttdef"><b>Definition:</b> <a href="viewportview_8h_source.html#l00067">viewportview.h:67</a></div></div>
<div class="ttc" id="viewportview_8h_html"><div class="ttname"><a href="viewportview_8h.html">viewportview.h</a></div></div>
<div class="ttc" id="classShipCAD_1_1Viewport_html_af4f3c9649b9d1af1b149048fc99aebe9"><div class="ttname"><a href="classShipCAD_1_1Viewport.html#af4f3c9649b9d1af1b149048fc99aebe9">ShipCAD::Viewport::setCurveFaceShader</a></div><div class="ttdeci">CurveFaceShader * setCurveFaceShader()</div><div class="ttdef"><b>Definition:</b> <a href="viewport_8cpp_source.html#l00271">viewport.cpp:271</a></div></div>
<div class="ttc" id="structShipCAD_1_1PickRay_html"><div class="ttname"><a href="structShipCAD_1_1PickRay.html">ShipCAD::PickRay</a></div><div class="ttdoc">a pick ray (line) </div><div class="ttdef"><b>Definition:</b> <a href="shipcadlib_8h_source.html#l00171">shipcadlib.h:171</a></div></div>
<div class="ttc" id="classShipCAD_1_1LightedFaceShader_html"><div class="ttname"><a href="classShipCAD_1_1LightedFaceShader.html">ShipCAD::LightedFaceShader</a></div><div class="ttdef"><b>Definition:</b> <a href="shader_8h_source.html#l00133">shader.h:133</a></div></div>
<div class="ttc" id="classShipCAD_1_1Viewport_html_a03cc2ed85178b9735c80b11dceb470b5"><div class="ttname"><a href="classShipCAD_1_1Viewport.html#a03cc2ed85178b9735c80b11dceb470b5">ShipCAD::Viewport::setLightedFaceShader</a></div><div class="ttdeci">FaceShader * setLightedFaceShader()</div><div class="ttdef"><b>Definition:</b> <a href="viewport_8cpp_source.html#l00258">viewport.cpp:258</a></div></div>
<div class="ttc" id="classShipCAD_1_1ViewportView_html_aec2ef49c2d2ecf9099dfbf32cd645144"><div class="ttname"><a href="classShipCAD_1_1ViewportView.html#aec2ef49c2d2ecf9099dfbf32cd645144">ShipCAD::ViewportView::construct</a></div><div class="ttdeci">static ViewportView * construct(viewport_type_t ty, Viewport *vp)</div><div class="ttdef"><b>Definition:</b> <a href="viewportview_8cpp_source.html#l00052">viewportview.cpp:52</a></div></div>
<div class="ttc" id="namespaceShipCAD_html_a58f51ebd2e66de5e41c2ffd6f434241e"><div class="ttname"><a href="namespaceShipCAD.html#a58f51ebd2e66de5e41c2ffd6f434241e">ShipCAD::camera_type_t</a></div><div class="ttdeci">camera_type_t</div><div class="ttdef"><b>Definition:</b> <a href="shipcadlib_8h_source.html#l00077">shipcadlib.h:77</a></div></div>
<div class="ttc" id="structShipCAD_1_1PickRay_html_a5b5dbf3de2afc804978a5e35ac582028"><div class="ttname"><a href="structShipCAD_1_1PickRay.html#a5b5dbf3de2afc804978a5e35ac582028">ShipCAD::PickRay::multi_sel</a></div><div class="ttdeci">bool multi_sel</div><div class="ttdef"><b>Definition:</b> <a href="shipcadlib_8h_source.html#l00176">shipcadlib.h:176</a></div></div>
<div class="ttc" id="classShipCAD_1_1ViewportViewPerspective_html_a6d48a61a324740874979d599352bef82"><div class="ttname"><a href="classShipCAD_1_1ViewportViewPerspective.html#a6d48a61a324740874979d599352bef82">ShipCAD::ViewportViewPerspective::getAngle</a></div><div class="ttdeci">float getAngle() const </div><div class="ttdef"><b>Definition:</b> <a href="viewportview_8h_source.html#l00154">viewportview.h:154</a></div></div>
<div class="ttc" id="classShipCAD_1_1Controller_html_ae09ac41e86659fab53e236f27f2ca761"><div class="ttname"><a href="classShipCAD_1_1Controller.html#ae09ac41e86659fab53e236f27f2ca761">ShipCAD::Controller::shootPickRay</a></div><div class="ttdeci">bool shootPickRay(Viewport &amp;vp, const PickRay &amp;ray)</div><div class="ttdoc">shoot a pick ray, change items to selected </div><div class="ttdef"><b>Definition:</b> <a href="controller_8cpp_source.html#l00063">controller.cpp:63</a></div></div>
<div class="ttc" id="classShipCAD_1_1Viewport_html_ab98dde7bb1d923b8cfc9a0c3cb249c2c"><div class="ttname"><a href="classShipCAD_1_1Viewport.html#ab98dde7bb1d923b8cfc9a0c3cb249c2c">ShipCAD::Viewport::mouseMoveEvent</a></div><div class="ttdeci">virtual void mouseMoveEvent(QMouseEvent *)</div><div class="ttdef"><b>Definition:</b> <a href="viewport_8cpp_source.html#l00386">viewport.cpp:386</a></div></div>
<div class="ttc" id="classShipCAD_1_1CurveFaceShader_html_aff6cca39c6e9c17c7dee2040724c5946"><div class="ttname"><a href="classShipCAD_1_1CurveFaceShader.html#aff6cca39c6e9c17c7dee2040724c5946">ShipCAD::CurveFaceShader::setMatrices</a></div><div class="ttdeci">void setMatrices(const QMatrix4x4 &amp;proj, const QMatrix4x4 &amp;view, const QMatrix4x4 &amp;world)</div><div class="ttdef"><b>Definition:</b> <a href="shader_8cpp_source.html#l00381">shader.cpp:381</a></div></div>
<div class="ttc" id="namespaceShipCAD_html_a67437198ee14f74e6c5277d761894863a109cd328af19be260371a7e5333043f8"><div class="ttname"><a href="namespaceShipCAD.html#a67437198ee14f74e6c5277d761894863a109cd328af19be260371a7e5333043f8">ShipCAD::vmWireFrame</a></div><div class="ttdef"><b>Definition:</b> <a href="shipcadlib_8h_source.html#l00063">shipcadlib.h:63</a></div></div>
<div class="ttc" id="namespaceShipCAD_html_aeeeb05810f2e31ef89fd4ac6b6ba9c0a"><div class="ttname"><a href="namespaceShipCAD.html#aeeeb05810f2e31ef89fd4ac6b6ba9c0a">ShipCAD::viewport_type_t</a></div><div class="ttdeci">viewport_type_t</div><div class="ttdef"><b>Definition:</b> <a href="shipcadlib_8h_source.html#l00070">shipcadlib.h:70</a></div></div>
<div class="ttc" id="classShipCAD_1_1ViewportView_html_a0be1613b2ae2087da00811f2bdb0bd45"><div class="ttname"><a href="classShipCAD_1_1ViewportView.html#a0be1613b2ae2087da00811f2bdb0bd45">ShipCAD::ViewportView::getWorld</a></div><div class="ttdeci">const QMatrix4x4 &amp; getWorld() const </div><div class="ttdef"><b>Definition:</b> <a href="viewportview_8h_source.html#l00061">viewportview.h:61</a></div></div>
<div class="ttc" id="classShipCAD_1_1Viewport_html_a0dddc5b05c7308f8818a726b16a7d9eb"><div class="ttname"><a href="classShipCAD_1_1Viewport.html#a0dddc5b05c7308f8818a726b16a7d9eb">ShipCAD::Viewport::mousePressEvent</a></div><div class="ttdeci">virtual void mousePressEvent(QMouseEvent *)</div><div class="ttdef"><b>Definition:</b> <a href="viewport_8cpp_source.html#l00311">viewport.cpp:311</a></div></div>
<div class="ttc" id="classShipCAD_1_1ViewportView_html_ac763be6de52b393cb0b9ff4be4c66fcf"><div class="ttname"><a href="classShipCAD_1_1ViewportView.html#ac763be6de52b393cb0b9ff4be4c66fcf">ShipCAD::ViewportView::convert3D</a></div><div class="ttdeci">QPoint convert3D(const QVector3D &amp;pt, int w, int h) const </div><div class="ttdoc">convert a 3D point to viewport 2d coordinates </div><div class="ttdef"><b>Definition:</b> <a href="viewportview_8cpp_source.html#l00086">viewportview.cpp:86</a></div></div>
<div class="ttc" id="classShipCAD_1_1Shader_html"><div class="ttname"><a href="classShipCAD_1_1Shader.html">ShipCAD::Shader</a></div><div class="ttdef"><b>Definition:</b> <a href="shader_8h_source.html#l00045">shader.h:45</a></div></div>
<div class="ttc" id="classShipCAD_1_1ViewportView_html_a537210f7c2872e7b8921341660e85347"><div class="ttname"><a href="classShipCAD_1_1ViewportView.html#a537210f7c2872e7b8921341660e85347">ShipCAD::ViewportView::rightMouseMove</a></div><div class="ttdeci">virtual bool rightMouseMove(QPoint cur, QPoint prev, int w, int h)</div><div class="ttdef"><b>Definition:</b> <a href="viewportview_8cpp_source.html#l00130">viewportview.cpp:130</a></div></div>
<div class="ttc" id="classShipCAD_1_1Viewport_html_acce571248835d8a66fcb4787c2384824"><div class="ttname"><a href="classShipCAD_1_1Viewport.html#acce571248835d8a66fcb4787c2384824">ShipCAD::Viewport::getCamera</a></div><div class="ttdeci">const QVector3D &amp; getCamera() const </div><div class="ttdef"><b>Definition:</b> <a href="viewport_8cpp_source.html#l00082">viewport.cpp:82</a></div></div>
<div class="ttc" id="controller_8h_html"><div class="ttname"><a href="controller_8h.html">controller.h</a></div></div>
<div class="ttc" id="classShipCAD_1_1Viewport_html_ae8cc8dfbda37517c2af3821cd87deb74"><div class="ttname"><a href="classShipCAD_1_1Viewport.html#ae8cc8dfbda37517c2af3821cd87deb74">ShipCAD::Viewport::getController</a></div><div class="ttdeci">ShipCAD::Controller * getController()</div><div class="ttdef"><b>Definition:</b> <a href="viewport_8cpp_source.html#l00072">viewport.cpp:72</a></div></div>
<div class="ttc" id="classShipCAD_1_1Viewport_html_a9ac4c18fa3454cddc5e73322c3d1afd8"><div class="ttname"><a href="classShipCAD_1_1Viewport.html#a9ac4c18fa3454cddc5e73322c3d1afd8">ShipCAD::Viewport::wheelEvent</a></div><div class="ttdeci">virtual void wheelEvent(QWheelEvent *)</div><div class="ttdef"><b>Definition:</b> <a href="viewport_8cpp_source.html#l00429">viewport.cpp:429</a></div></div>
<div class="ttc" id="classShipCAD_1_1ViewportViewPerspective_html_ad6d853a15bc9015d43e4c052471f2cb1"><div class="ttname"><a href="classShipCAD_1_1ViewportViewPerspective.html#ad6d853a15bc9015d43e4c052471f2cb1">ShipCAD::ViewportViewPerspective::setAngle</a></div><div class="ttdeci">void setAngle(float val)</div><div class="ttdef"><b>Definition:</b> <a href="viewportview_8h_source.html#l00156">viewportview.h:156</a></div></div>
<div class="ttc" id="classShipCAD_1_1Viewport_html_a719ba3bde9e3b390215c420bd62e6b20"><div class="ttname"><a href="classShipCAD_1_1Viewport.html#a719ba3bde9e3b390215c420bd62e6b20">ShipCAD::Viewport::getElevation</a></div><div class="ttdeci">float getElevation() const </div><div class="ttdef"><b>Definition:</b> <a href="viewport_8cpp_source.html#l00156">viewport.cpp:156</a></div></div>
<div class="ttc" id="classShipCAD_1_1ViewportView_html_af87bb73f78d5393d013708542eb184ae"><div class="ttname"><a href="classShipCAD_1_1ViewportView.html#af87bb73f78d5393d013708542eb184ae">ShipCAD::ViewportView::getProj</a></div><div class="ttdeci">const QMatrix4x4 &amp; getProj() const </div><div class="ttdef"><b>Definition:</b> <a href="viewportview_8h_source.html#l00065">viewportview.h:65</a></div></div>
<div class="ttc" id="classShipCAD_1_1Viewport_html_a1e18a1ff4a52be33ef63d25034561850"><div class="ttname"><a href="classShipCAD_1_1Viewport.html#a1e18a1ff4a52be33ef63d25034561850">ShipCAD::Viewport::~Viewport</a></div><div class="ttdeci">virtual ~Viewport()</div><div class="ttdef"><b>Definition:</b> <a href="viewport_8cpp_source.html#l00061">viewport.cpp:61</a></div></div>
<div class="ttc" id="utility_8h_html"><div class="ttname"><a href="utility_8h.html">utility.h</a></div></div>
<div class="ttc" id="classShipCAD_1_1ShipCADModel_html_a6941ad7a2b167419e844823fa8461019"><div class="ttname"><a href="classShipCAD_1_1ShipCADModel.html#a6941ad7a2b167419e844823fa8461019">ShipCAD::ShipCADModel::getSurface</a></div><div class="ttdeci">SubdivisionSurface * getSurface()</div><div class="ttdef"><b>Definition:</b> <a href="shipcadmodel_8h_source.html#l00071">shipcadmodel.h:71</a></div></div>
<div class="ttc" id="classShipCAD_1_1ShipCADModel_html_abf593b803e96a1fd8e56f36b3b6d0954"><div class="ttname"><a href="classShipCAD_1_1ShipCADModel.html#abf593b803e96a1fd8e56f36b3b6d0954">ShipCAD::ShipCADModel::draw</a></div><div class="ttdeci">void draw(Viewport &amp;vp)</div><div class="ttdef"><b>Definition:</b> <a href="shipcadmodel_8cpp_source.html#l00680">shipcadmodel.cpp:680</a></div></div>
<div class="ttc" id="namespaceShipCAD_html_a67437198ee14f74e6c5277d761894863"><div class="ttname"><a href="namespaceShipCAD.html#a67437198ee14f74e6c5277d761894863">ShipCAD::viewport_mode_t</a></div><div class="ttdeci">viewport_mode_t</div><div class="ttdef"><b>Definition:</b> <a href="shipcadlib_8h_source.html#l00062">shipcadlib.h:62</a></div></div>
<div class="ttc" id="classShipCAD_1_1Viewport_html_a9f643e335e21dc9b752098e00dc5db48"><div class="ttname"><a href="classShipCAD_1_1Viewport.html#a9f643e335e21dc9b752098e00dc5db48">ShipCAD::Viewport::getAngle</a></div><div class="ttdeci">float getAngle() const </div><div class="ttdef"><b>Definition:</b> <a href="viewport_8cpp_source.html#l00139">viewport.cpp:139</a></div></div>
<div class="ttc" id="classShipCAD_1_1ViewportViewPerspective_html_ad09e4532f81905f9ea90545b0b6d4856"><div class="ttname"><a href="classShipCAD_1_1ViewportViewPerspective.html#ad09e4532f81905f9ea90545b0b6d4856">ShipCAD::ViewportViewPerspective::setElevation</a></div><div class="ttdeci">void setElevation(float val)</div><div class="ttdef"><b>Definition:</b> <a href="viewportview_8h_source.html#l00160">viewportview.h:160</a></div></div>
<div class="ttc" id="classShipCAD_1_1LineShader_html"><div class="ttname"><a href="classShipCAD_1_1LineShader.html">ShipCAD::LineShader</a></div><div class="ttdef"><b>Definition:</b> <a href="shader_8h_source.html#l00075">shader.h:75</a></div></div>
<div class="ttc" id="classShipCAD_1_1Controller_html_a7868a3bac4ed86abff1fe5a0fabb4abd"><div class="ttname"><a href="classShipCAD_1_1Controller.html#a7868a3bac4ed86abff1fe5a0fabb4abd">ShipCAD::Controller::getModel</a></div><div class="ttdeci">ShipCADModel * getModel()</div><div class="ttdoc">get the model this is controlling </div><div class="ttdef"><b>Definition:</b> <a href="controller_8h_source.html#l00070">controller.h:70</a></div></div>
<div class="ttc" id="classShipCAD_1_1ViewportView_html_a6991b6b121b609ec7d18518a8f872859"><div class="ttname"><a href="classShipCAD_1_1ViewportView.html#a6991b6b121b609ec7d18518a8f872859">ShipCAD::ViewportView::pointDrag</a></div><div class="ttdeci">virtual bool pointDrag(QPoint pos, int w, int h, QVector3D &amp;newcoord)</div><div class="ttdoc">drag a point in the viewport </div><div class="ttdef"><b>Definition:</b> <a href="viewportview_8cpp_source.html#l00149">viewportview.cpp:149</a></div></div>
<div class="ttc" id="classShipCAD_1_1Controller_html_acdf0f8352ab57d4b52c40193f031909b"><div class="ttname"><a href="classShipCAD_1_1Controller.html#acdf0f8352ab57d4b52c40193f031909b">ShipCAD::Controller::addFlowline</a></div><div class="ttdeci">void addFlowline(const QVector2D &amp;source, Viewport &amp;vp)</div><div class="ttdef"><b>Definition:</b> <a href="controller_8cpp_source.html#l00830">controller.cpp:830</a></div></div>
<div class="ttc" id="classShipCAD_1_1Viewport_html_a4eeeb100fd88487215bb7794bdf5e0cb"><div class="ttname"><a href="classShipCAD_1_1Viewport.html#a4eeeb100fd88487215bb7794bdf5e0cb">ShipCAD::Viewport::resizeEvent</a></div><div class="ttdeci">virtual void resizeEvent(QResizeEvent *event)</div><div class="ttdef"><b>Definition:</b> <a href="viewport_8cpp_source.html#l00178">viewport.cpp:178</a></div></div>
<div class="ttc" id="classShipCAD_1_1Viewport_html_ae1a93920fcaf1b6eaa46d390bbd15ce4"><div class="ttname"><a href="classShipCAD_1_1Viewport.html#ae1a93920fcaf1b6eaa46d390bbd15ce4">ShipCAD::Viewport::renderOpenGL</a></div><div class="ttdeci">virtual void renderOpenGL()</div><div class="ttdoc">render OpenGL </div><div class="ttdef"><b>Definition:</b> <a href="viewport_8cpp_source.html#l00216">viewport.cpp:216</a></div></div>
<div class="ttc" id="classShipCAD_1_1Viewport_html_aab16013a5098f23f3f1bb9d4318c3d3b"><div class="ttname"><a href="classShipCAD_1_1Viewport.html#aab16013a5098f23f3f1bb9d4318c3d3b">ShipCAD::Viewport::convert3D</a></div><div class="ttdeci">QPoint convert3D(const QVector3D &amp;pt) const </div><div class="ttdef"><b>Definition:</b> <a href="viewport_8cpp_source.html#l00173">viewport.cpp:173</a></div></div>
<div class="ttc" id="classShipCAD_1_1ViewportViewPerspective_html"><div class="ttname"><a href="classShipCAD_1_1ViewportViewPerspective.html">ShipCAD::ViewportViewPerspective</a></div><div class="ttdoc">calculate view, world matrices and operations for a Perspective viewport </div><div class="ttdef"><b>Definition:</b> <a href="viewportview_8h_source.html#l00144">viewportview.h:144</a></div></div>
<div class="ttc" id="classShipCAD_1_1ViewportView_html_a2bc94791273d6134566a386f2a735e37"><div class="ttname"><a href="classShipCAD_1_1ViewportView.html#a2bc94791273d6134566a386f2a735e37">ShipCAD::ViewportView::projectTo3D</a></div><div class="ttdeci">virtual QVector2D projectTo3D(QPoint pos, int w, int h)=0</div><div class="ttdoc">convert screen coordinates to 2D world coordinates </div></div>
<div class="ttc" id="classShipCAD_1_1Viewport_html_a910ae7ca3acc3a55ae4920ed57305a01"><div class="ttname"><a href="classShipCAD_1_1Viewport.html#a910ae7ca3acc3a55ae4920ed57305a01">ShipCAD::Viewport::contextMenuEvent</a></div><div class="ttdeci">void contextMenuEvent(ShipCAD::ViewportContextEvent *event)</div></div>
<div class="ttc" id="classShipCAD_1_1Viewport_html_a205e5082395c6d01660ffc179c57b83e"><div class="ttname"><a href="classShipCAD_1_1Viewport.html#a205e5082395c6d01660ffc179c57b83e">ShipCAD::Viewport::getViewportMode</a></div><div class="ttdeci">viewport_mode_t getViewportMode() const </div><div class="ttdef"><b>Definition:</b> <a href="viewport_8h_source.html#l00095">viewport.h:95</a></div></div>
<div class="ttc" id="classShipCAD_1_1Viewport_html_acc401d8a0d84810a9d695e3621e29b4e"><div class="ttname"><a href="classShipCAD_1_1Viewport.html#acc401d8a0d84810a9d695e3621e29b4e">ShipCAD::Viewport::keyPressEvent</a></div><div class="ttdeci">virtual void keyPressEvent(QKeyEvent *)</div><div class="ttdef"><b>Definition:</b> <a href="viewport_8cpp_source.html#l00446">viewport.cpp:446</a></div></div>
<div class="ttc" id="classShipCAD_1_1ViewportViewPerspective_html_a4baad3b4ab5a1f3fb7fd2dfa9ac49952"><div class="ttname"><a href="classShipCAD_1_1ViewportViewPerspective.html#a4baad3b4ab5a1f3fb7fd2dfa9ac49952">ShipCAD::ViewportViewPerspective::getElevation</a></div><div class="ttdeci">float getElevation() const </div><div class="ttdef"><b>Definition:</b> <a href="viewportview_8h_source.html#l00158">viewportview.h:158</a></div></div>
<div class="ttc" id="classShipCAD_1_1Viewport_html_ab247f28eb569e160142901b6eef265a3"><div class="ttname"><a href="classShipCAD_1_1Viewport.html#ab247f28eb569e160142901b6eef265a3">ShipCAD::Viewport::contextMenu</a></div><div class="ttdeci">bool contextMenu(QMouseEvent *event)</div><div class="ttdef"><b>Definition:</b> <a href="viewport_8cpp_source.html#l00284">viewport.cpp:284</a></div></div>
<div class="ttc" id="classShipCAD_1_1ViewportView_html_a33150e3f757ddbbe045d7d046b4862e5"><div class="ttname"><a href="classShipCAD_1_1ViewportView.html#a33150e3f757ddbbe045d7d046b4862e5">ShipCAD::ViewportView::getCamera</a></div><div class="ttdeci">const QVector3D &amp; getCamera() const </div><div class="ttdef"><b>Definition:</b> <a href="viewportview_8h_source.html#l00069">viewportview.h:69</a></div></div>
<div class="ttc" id="classShipCAD_1_1Shader_html_a00c06ead1e413d5d5ecbced82478f753"><div class="ttname"><a href="classShipCAD_1_1Shader.html#a00c06ead1e413d5d5ecbced82478f753">ShipCAD::Shader::bind</a></div><div class="ttdeci">void bind()</div><div class="ttdef"><b>Definition:</b> <a href="shader_8h_source.html#l00062">shader.h:62</a></div></div>
<div class="ttc" id="classShipCAD_1_1LineShader_html_ac0ee7d9d9f4fa7e4d233c2426c756a68"><div class="ttname"><a href="classShipCAD_1_1LineShader.html#ac0ee7d9d9f4fa7e4d233c2426c756a68">ShipCAD::LineShader::setMatrix</a></div><div class="ttdeci">void setMatrix(const QMatrix4x4 &amp;matrix)</div><div class="ttdef"><b>Definition:</b> <a href="shader_8cpp_source.html#l00122">shader.cpp:122</a></div></div>
<div class="ttc" id="classShipCAD_1_1Viewport_html_a7cb6994a92d40990b58be272953b9120"><div class="ttname"><a href="classShipCAD_1_1Viewport.html#a7cb6994a92d40990b58be272953b9120">ShipCAD::Viewport::mouseReleaseEvent</a></div><div class="ttdeci">virtual void mouseReleaseEvent(QMouseEvent *)</div><div class="ttdef"><b>Definition:</b> <a href="viewport_8cpp_source.html#l00345">viewport.cpp:345</a></div></div>
<div class="ttc" id="classShipCAD_1_1Viewport_html_a4bda4b742dc477ed5dc2ab6ac7fe92bc"><div class="ttname"><a href="classShipCAD_1_1Viewport.html#a4bda4b742dc477ed5dc2ab6ac7fe92bc">ShipCAD::Viewport::setElevation</a></div><div class="ttdeci">void setElevation(float val)</div><div class="ttdef"><b>Definition:</b> <a href="viewport_8cpp_source.html#l00164">viewport.cpp:164</a></div></div>
<div class="ttc" id="classShipCAD_1_1Viewport_html_af9b33616bfc97332f37acafe48ed4c9f"><div class="ttname"><a href="classShipCAD_1_1Viewport.html#af9b33616bfc97332f37acafe48ed4c9f">ShipCAD::Viewport::canPick</a></div><div class="ttdeci">bool canPick() const </div><div class="ttdef"><b>Definition:</b> <a href="viewport_8cpp_source.html#l00291">viewport.cpp:291</a></div></div>
<div class="ttc" id="namespaceShipCAD_html"><div class="ttname"><a href="namespaceShipCAD.html">ShipCAD</a></div><div class="ttdef"><b>Definition:</b> <a href="backgroundimage_8h_source.html#l00039">backgroundimage.h:39</a></div></div>
<div class="ttc" id="classShipCAD_1_1LightedFaceShader_html_a0a5515fd6bcaf380de2ff15b42261f83"><div class="ttname"><a href="classShipCAD_1_1LightedFaceShader.html#a0a5515fd6bcaf380de2ff15b42261f83">ShipCAD::LightedFaceShader::setMatrices</a></div><div class="ttdeci">void setMatrices(const QMatrix4x4 &amp;proj, const QMatrix4x4 &amp;view, const QMatrix4x4 &amp;world)</div><div class="ttdef"><b>Definition:</b> <a href="shader_8cpp_source.html#l00306">shader.cpp:306</a></div></div>
<div class="ttc" id="classShipCAD_1_1Viewport_html_a9c35de3f7c9d7c860c494081b48309b3"><div class="ttname"><a href="classShipCAD_1_1Viewport.html#a9c35de3f7c9d7c860c494081b48309b3">ShipCAD::Viewport::initialize</a></div><div class="ttdeci">virtual void initialize()</div><div class="ttdef"><b>Definition:</b> <a href="viewport_8cpp_source.html#l00087">viewport.cpp:87</a></div></div>
<div class="ttc" id="classShipCAD_1_1Viewport_html_a7997e0e684a4f8b5709f4d98be6cebb4"><div class="ttname"><a href="classShipCAD_1_1Viewport.html#a7997e0e684a4f8b5709f4d98be6cebb4">ShipCAD::Viewport::update</a></div><div class="ttdeci">virtual void update()</div><div class="ttdef"><b>Definition:</b> <a href="viewport_8cpp_source.html#l00185">viewport.cpp:185</a></div></div>
<div class="ttc" id="classShipCAD_1_1MonoFaceShader_html"><div class="ttname"><a href="classShipCAD_1_1MonoFaceShader.html">ShipCAD::MonoFaceShader</a></div><div class="ttdef"><b>Definition:</b> <a href="shader_8h_source.html#l00114">shader.h:114</a></div></div>
<div class="ttc" id="classShipCAD_1_1Preferences_html_ab511ccb47da78b8fb580c16aa027b4fa"><div class="ttname"><a href="classShipCAD_1_1Preferences.html#ab511ccb47da78b8fb580c16aa027b4fa">ShipCAD::Preferences::getViewportColor</a></div><div class="ttdeci">QColor getViewportColor() const </div><div class="ttdef"><b>Definition:</b> <a href="preferences_8h_source.html#l00119">preferences.h:119</a></div></div>
<div class="ttc" id="classShipCAD_1_1ViewportContextEvent_html"><div class="ttname"><a href="classShipCAD_1_1ViewportContextEvent.html">ShipCAD::ViewportContextEvent</a></div><div class="ttdef"><b>Definition:</b> <a href="viewport_8h_source.html#l00054">viewport.h:54</a></div></div>
<div class="ttc" id="classShipCAD_1_1ViewportView_html_aaeff27f9b32dc7ee98dbfc14b7eca804"><div class="ttname"><a href="classShipCAD_1_1ViewportView.html#aaeff27f9b32dc7ee98dbfc14b7eca804">ShipCAD::ViewportView::rightMouseRelease</a></div><div class="ttdeci">virtual bool rightMouseRelease(QPoint pos, int w, int h)</div><div class="ttdef"><b>Definition:</b> <a href="viewportview_8cpp_source.html#l00114">viewportview.cpp:114</a></div></div>
<div class="ttc" id="classShipCAD_1_1ViewportView_html_a77ce1c6a0216a791ee2ae79dd6674cde"><div class="ttname"><a href="classShipCAD_1_1ViewportView.html#a77ce1c6a0216a791ee2ae79dd6674cde">ShipCAD::ViewportView::wheelWithDegrees</a></div><div class="ttdeci">virtual bool wheelWithDegrees(QPoint degrees, int w, int h)</div><div class="ttdef"><b>Definition:</b> <a href="viewportview_8cpp_source.html#l00135">viewportview.cpp:135</a></div></div>
<div class="ttc" id="namespaceShipCAD_html_a58f51ebd2e66de5e41c2ffd6f434241eaa4100f3d3073015697dd72390b55fa44"><div class="ttname"><a href="namespaceShipCAD.html#a58f51ebd2e66de5e41c2ffd6f434241eaa4100f3d3073015697dd72390b55fa44">ShipCAD::ftStandard</a></div><div class="ttdef"><b>Definition:</b> <a href="shipcadlib_8h_source.html#l00079">shipcadlib.h:79</a></div></div>
<div class="ttc" id="classOpenGLWindow_html_aed4e2ee22e113b2f7e7d1eba4ef1b965"><div class="ttname"><a href="classOpenGLWindow.html#aed4e2ee22e113b2f7e7d1eba4ef1b965">OpenGLWindow::initialize</a></div><div class="ttdeci">virtual void initialize()</div><div class="ttdef"><b>Definition:</b> <a href="openglwindow_8cpp_source.html#l00091">openglwindow.cpp:91</a></div></div>
<div class="ttc" id="classShipCAD_1_1Visibility_html_a177cc880657723c1cbcc4c66c16ee208"><div class="ttname"><a href="classShipCAD_1_1Visibility.html#a177cc880657723c1cbcc4c66c16ee208">ShipCAD::Visibility::isShowControlNet</a></div><div class="ttdeci">bool isShowControlNet() const </div><div class="ttdoc">is control net shown </div><div class="ttdef"><b>Definition:</b> <a href="visibility_8h_source.html#l00097">visibility.h:97</a></div></div>
<div class="ttc" id="classShipCAD_1_1Controller_html_a8f573f351b3f9568618e44ab39fb2a7e"><div class="ttname"><a href="classShipCAD_1_1Controller.html#a8f573f351b3f9568618e44ab39fb2a7e">ShipCAD::Controller::movePoint</a></div><div class="ttdeci">void movePoint(QVector3D changedCoords)</div><div class="ttdoc">move a selected point in the model </div><div class="ttdef"><b>Definition:</b> <a href="controller_8cpp_source.html#l01394">controller.cpp:1394</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sun Feb 25 2018 15:36:00 for ShipCAD by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
